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 EgorBo in #111911 #268

Open
EgorBot opened this issue Jan 28, 2025 · 1 comment
Open

EgorBot for EgorBo in #111911 #268

EgorBot opened this issue Jan 28, 2025 · 1 comment

Comments

@EgorBot
Copy link
Owner

EgorBot commented Jan 28, 2025

Processing dotnet/runtime#111911 (comment) command:

Command

-amd -mono -commit main --envvars MONO_VERBOSE_METHOD:TestMethod

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;

public class Benchmarks
{
    private static ReadOnlySpan<byte> TwoDigitsCharsAsBytes =>
        MemoryMarshal.AsBytes<char>("00010203040506070809" +
                                    "10111213141516171819" +
                                    "20212223242526272829" +
                                    "30313233343536373839" +
                                    "40414243444546474849" +
                                    "50515253545556575859" +
                                    "60616263646566676869" +
                                    "70717273747576777879" +
                                    "80818283848586878889" +
                                    "90919293949596979899");

    [MethodImpl(MethodImplOptions.NoInlining)]  
    static byte TestMethod(int i)
    {
        return TwoDigitsCharsAsBytes[i];
    }

    [Benchmark]
    public byte Bench()
    {
        return TestMethod(1);
    }
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Jan 28, 2025

Benchmark results on linux_azure_genoa

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
AMD EPYC 9V74, 1 CPU, 16 logical and 8 physical cores
  Job-BKNBUG : .NET 10.0.0 (42.42.42.42424) using MonoVM, X64 X86Base
Job=Job-BKNBUG  EnvironmentVariables=MONO_VERBOSE_METHOD=TestMethod  Toolchain=CoreRun
StdDev=0.008 ns
Method Mean Error
Bench 15.83 ns 0.010 ns

BDN_Artifacts.zip

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