EgorBot / runtime-utils

MIT License
0 stars 1 forks source link

EgorBot for EgorBo in #52 #62

Open EgorBot opened 2 months ago

EgorBot commented 2 months ago

Processing https://github.com/EgorBot/runtime-utils/issues/52#issuecomment-2327234704 command:

Command -intel -arm64 -profiler -pr 107218 ```cs using System; using System.Runtime.CompilerServices; using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Running; BenchmarkRunner.Run(args: args); public class Bench { [Benchmark] public void Foo() { for (int i = 0; i < 1000; i++) Work(1); } [MethodImpl(MethodImplOptions.NoInlining)] static void Work(int size) => GC.KeepAlive(GC.AllocateUninitializedArray(size)); } ```

(EgorBot will reply in this issue)

EgorBot commented 2 months ago

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-OTJYDB : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-NHEJYJ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
RatioSD=0.02
Method Toolchain Mean Error Ratio
Foo Main 10.058 μs 0.1493 μs 1.00
Foo PR 9.389 μs 0.1258 μs 0.93

BDN_Artifacts.zip

Flame graphs: Main vs PR 🔥 Hot asm: Main vs PR Hot functions: Main vs PR Counters: Main vs PR

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

EgorBot commented 2 months ago

cc @EgorBo (logs)

EgorBot commented 2 months ago

Benchmark results on Ampere

BenchmarkDotNet v0.14.0, Ubuntu 22.04.4 LTS (Jammy Jellyfish)
Ampere
  Job-QANLBI : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-GMRJLU : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Method Toolchain Mean Error Ratio
Foo Main 12.446 μs 0.0616 μs 1.00
Foo PR 9.029 μs 0.0190 μs 0.73

BDN_Artifacts.zip

Flame graphs: Main vs PR 🔥 Hot asm: Main vs PR Hot functions: Main vs PR Counters: Main vs PR

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

EgorBot commented 2 months ago

cc @EgorBo (logs)