Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

EgorBot for EgorBo in #107218 #11

Open

Description

@EgorBot

Processing dotnet/runtime#107218 (comment):


-intel -arm64 -perf

using System;
using System.Runtime.CompilerServices;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

BenchmarkRunner.Run<Bench>(args: args);

public class Bench
{
    [Benchmark]
    public void Foo()
    {
        for (int i = 0; i < 1000; i++)
            Work<char>(1);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    static void Work<T>(int size) => GC.KeepAlive(GC.AllocateArray<T>(size));
}

Activity

  1. EgorBot commented on Sep 1, 2024

    @EgorBot
    OwnerAuthor

    Benchmark results on Intel

    BenchmarkDotNet v0.14.0, Ubuntu 22.04.4 LTS (Jammy Jellyfish)
    Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 16 logical and 8 physical cores
      Job-FGUAOD : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
      Job-ATHUWJ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
    
    Method Toolchain Mean Error Ratio
    Foo Main 27.94 μs 0.287 μs 1.00
    Foo PR 26.85 μs 0.247 μs 0.96

    BDN_Artifacts.zip

    🔥 Flame graphs (Click to expand), Before: Main
    vs After:
    PR

    Hot asm: Main vs PR
    Hot functions: Main vs PR

    For clean perf results, make sure you have just one [Benchmark] in your app.

  2. EgorBot commented on Sep 1, 2024

    @EgorBot
    OwnerAuthor
  3. EgorBot commented on Sep 1, 2024

    @EgorBot
    OwnerAuthor

    Benchmark results on Arm64

    BenchmarkDotNet v0.14.0, Ubuntu 22.04.4 LTS (Jammy Jellyfish)
    Unknown processor
      Job-AHKYQS : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
      Job-TEJNGH : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
    
    Method Toolchain Mean Error Ratio
    Foo Main 38.05 μs 0.157 μs 1.00
    Foo PR 37.39 μs 0.119 μs 0.98

    BDN_Artifacts.zip

    🔥 Flame graphs (Click to expand), Before: Main
    vs After:
    PR

    Hot asm: Main vs PR
    Hot functions: Main vs PR

    For clean perf results, make sure you have just one [Benchmark] in your app.

  4. EgorBot commented on Sep 1, 2024

    @EgorBot
    OwnerAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions