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 #109237 #136

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

EgorBot for AndyAyersMS in #109237 #136

EgorBot opened this issue Oct 25, 2024 · 2 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Oct 25, 2024

Processing dotnet/runtime#109237 (comment) command:

Command
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System.Runtime.CompilerServices;

BenchmarkSwitcher.FromAssembly(typeof(Bench).Assembly).Run(args);

public class Bench
{
    static int[] s_array = new int[512];
    [Benchmark]
    public int Test() 
    {
        IEnumerable<int> e = s_array;
        int sum = 0;
        foreach (int i in e) sum += i;
        return sum;
    }
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 25, 2024

Benchmark results on Amd

BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
AMD EPYC 9R14, 1 CPU, 8 logical and 8 physical cores
  Job-PFTHSE : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-ZREUDE : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method Toolchain Mean Error Ratio
Test Main 470.0 ns 1.83 ns 1.00
Test PR 157.7 ns 0.01 ns 0.34

BDN_Artifacts.zip

@EgorBot
Copy link
Owner Author

EgorBot commented Oct 25, 2024

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