Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EgorBot for AndyAyersMS in #110258 #195

Open
EgorBot opened this issue Dec 2, 2024 · 2 comments
Open

EgorBot for AndyAyersMS in #110258 #195

EgorBot opened this issue Dec 2, 2024 · 2 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Dec 2, 2024

Processing dotnet/runtime#110258 (comment) command:

Command

-intel -arm -profiler --envvars DOTNET_TC_CallCounting:0 DOTNET_TieredPGO_InstrumentOnlyHotCode:0 DOTNET_TieredPGO_ScalableCountThreshold:1E

using BenchmarkDotNet.Attributes;

public class Bench
{
    int a = 0;
    int b = 0;
    int c = 0;
    int d = 0;
    int e = 0;

    [Benchmark]
    public int Test()
    {
        int zeros = 0;
        Parallel.For(0, 1024, i =>
        {
            int zeros = 0;
            int nonzeros = 0;
            if (a == 0)
                zeros++;
            else nonzeros++;
            if (b == 0)
                zeros++;
            else nonzeros++;
            if (c == 0)
                zeros++;
            else nonzeros++;
            if (d == 0)
                zeros++;
            else nonzeros++;
            if (e == 0)
                zeros++;
            else nonzeros++;
        });
        return zeros;
    }
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Dec 2, 2024

Benchmark results on linux_azure_cobalt100

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
azure_cobalt100
  Job-FUSTSB : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-NYCJHX : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
EnvironmentVariables=DOTNET_TC_CallCounting=0,DOTNET_TieredPGO_InstrumentOnlyHotCode=0,DOTNET_TieredPGO_ScalableCountThreshold=1E
Method Toolchain Mean Error Ratio
Test Main 18.80 μs 0.212 μs 1.00
Test PR 19.21 μs 0.154 μs 1.02

BDN_Artifacts.zip

Profiling for Bench_Test:

SVG flamegraph: Main vs PR 🔥
Speedscope flamegraph: Main vs PR
Hot asm code: Main vs PR
HW counters: Main vs PR


cc @AndyAyersMS (agent_logs.txt). EgorBot manual: link.

@EgorBot
Copy link
Owner Author

EgorBot commented Dec 2, 2024

Benchmark results on linux_azure_cascadelake

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 8 logical and 4 physical cores
  Job-THGAEU : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-CPKMZF : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
EnvironmentVariables=DOTNET_TC_CallCounting=0,DOTNET_TieredPGO_InstrumentOnlyHotCode=0,DOTNET_TieredPGO_ScalableCountThreshold=1E
Method Toolchain Mean Error Ratio
Test Main 26.81 μs 0.105 μs 1.00
Test PR 22.88 μs 0.079 μs 0.85

BDN_Artifacts.zip

Profiling for Bench_Test:

SVG flamegraph: Main vs PR 🔥
Speedscope flamegraph: Main vs PR
Hot asm code: Main vs PR
HW counters: Main vs PR


cc @AndyAyersMS (agent_logs.txt). EgorBot manual: link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant