EgorBot / runtime-utils

MIT License
0 stars 1 forks source link

EgorBot for EgorBo in #109428 #143

Open EgorBot opened 3 weeks ago

EgorBot commented 3 weeks ago

Processing https://github.com/dotnet/runtime/pull/109428#issuecomment-2450890950 command:

Command -arm64 -profiler ```cs using BenchmarkDotNet.Attributes; public class Bencha { static object obj = new MyClass(); [Benchmark] public void Bench() { if (obj is MyClass myClass) myClass.DoWork(); } } public class MyClass { public virtual void DoWork() {} } ```

(EgorBot will reply in this issue)

EgorBot commented 3 weeks ago

Benchmark results on Arm64

BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
Arm64
  Job-SGHXNH : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-CSZJTB : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Method Toolchain Mean Error Ratio
Bench Main 0.0022 ns 0.0002 ns 1.01
Bench PR 0.0047 ns 0.0001 ns 2.17

BDN_Artifacts.zip

Profile for Bencha_Bench:

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

EgorBot commented 3 weeks ago

cc @EgorBo (logs)