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 hez2010 in #112061 #285

Open
EgorBot opened this issue Feb 1, 2025 · 1 comment
Open

EgorBot for hez2010 in #112061 #285

EgorBot opened this issue Feb 1, 2025 · 1 comment

Comments

@EgorBot
Copy link
Owner

EgorBot commented Feb 1, 2025

Processing dotnet/runtime#112061 (comment) command:

Command

-intel

using System.Numerics;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

// Actual runner is optional, but if it exists, it has to be like this:
BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public class Bench
{
    private int v = 42;

    [Benchmark]
    public double GetDouble() => CastNumber<double>(this.v);

    static T CastNumber<T>(int v) where T : INumberBase<T>
    {
        return T.CreateTruncating(v);
    }
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Feb 1, 2025

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-XKIDUT : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-ZGMHNE : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method Toolchain Mean Error Ratio
GetDouble Main 1.1684 ns 0.0002 ns 1.000
GetDouble PR 0.0000 ns 0.0000 ns 0.000

BDN_Artifacts.zip

cc @hez2010 (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