Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EgorBot for EgorBo in #110923 #218

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

EgorBot for EgorBo in #110923 #218

EgorBot opened this issue Dec 24, 2024 · 2 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Dec 24, 2024

Processing dotnet/runtime#110923 (comment) command:

Command

-amd -arm -profiler

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

public class Benchmark
{
    static Guid guid = Guid.Parse("{D420C46B-04DC-4ABD-BF32-5132E82EE7F7}");

    [Benchmark]
    public bool FormatX()
    {
        Span<char> buffer = stackalloc char[100];
        bool result = guid.TryFormat(buffer, out int charsWritten, "X");
        Consume(buffer.Slice(0, charsWritten));
        return result;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    static void Consume(Span<char> _){}
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Dec 24, 2024

Benchmark results on linux_azure_cobalt100

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
azure_cobalt100
  Job-ELHZPW : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-EQSZST : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Method Toolchain Mean Error Ratio
FormatX Main 27.98 ns 0.012 ns 1.00
FormatX PR 24.11 ns 0.006 ns 0.86

BDN_Artifacts.zip

Profiling for Benchmark_FormatX:

SVG flamegraph: Main vs PR 🔥
Speedscope flamegraph: Main vs PR
Hot asm code: Main vs PR
HW counters: Main vs PR


cc @EgorBo (agent_logs.txt). EgorBot manual: link.

@EgorBot
Copy link
Owner Author

EgorBot commented Dec 24, 2024

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-YWEVAF : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-XPADJL : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method Toolchain Mean Error Ratio
FormatX Main 24.78 ns 0.041 ns 1.00
FormatX PR 22.66 ns 0.007 ns 0.91

BDN_Artifacts.zip

Profiling for Benchmark_FormatX:

SVG flamegraph: Main vs PR 🔥
Speedscope flamegraph: Main vs PR
Hot asm code: Main vs PR
HW counters: Main vs PR


cc @EgorBo (agent_logs.txt). EgorBot manual: link.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant