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 MichalPetryka in #99200 #133

Open
EgorBot opened this issue Oct 24, 2024 · 2 comments
Open

EgorBot for MichalPetryka in #99200 #133

EgorBot opened this issue Oct 24, 2024 · 2 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Oct 24, 2024

Processing dotnet/runtime#99200 (comment) command:

Command

-intel

using System;
using System.Diagnostics;
using System.Reflection.Emit;
using BenchmarkDotNet.Attributes;

public class Bench
{
    [Benchmark]
    public void DummyDynamicMethod()
    {
        DynamicMethod dm = new DynamicMethod("Dummy", typeof(void), null);

        ILGenerator il = dm.GetILGenerator();
        il.Emit(OpCodes.Ret);

        Action a = dm.CreateDelegate<Action>();
        a();
    }
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 24, 2024

Benchmark results on Intel

BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
Intel Xeon Platinum 8488C, 1 CPU, 8 logical and 4 physical cores
  Job-ZQQLSI : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-QURJGU : .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
DummyDynamicMethod Main 6.988 μs 0.0840 μs 1.00
DummyDynamicMethod PR 6.908 μs 0.1177 μs 0.99

BDN_Artifacts.zip

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 24, 2024

cc @MichalPetryka (logs)

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