Skip to content

Benchmarks for #113715 (AaronRobinsonMSFT) #321

Open
@EgorBot

Description

@EgorBot

Processing dotnet/runtime#113715 (comment) command:

Command

-intel -arm

using System;
using System.Reflection;
using System.Runtime.CompilerServices;

using BenchmarkDotNet.Attributes;

public unsafe class Bench
{
    private F _f;
    private byte[] _source;
    private byte[] _dest;
    private delegate* <ref byte, ref byte, nuint, void> _method;

    class F
    {
        ~F() { }
    }

    public Bench()
    {
        _f = new F();
        _source = new byte[10 * 1024];
        _dest = new byte[_source.Length];
        Random random = new Random();
        random.NextBytes(_source);

        var method = typeof(Buffer).GetMethod("BulkMoveWithWriteBarrier", BindingFlags.NonPublic | BindingFlags.Static)!;
        _method = (delegate* <ref byte, ref byte, nuint, void>)method.MethodHandle.GetFunctionPointer();
    }

    [Benchmark]
    public void BenchmarkBulkMoveWithWriteBarrier()
    {
        _method(ref _dest[0], ref _source[0], (nuint)_dest.Length);
    }

    [Benchmark]
    public void BenchmarkSuppressFinalize()
    {
        GC.SuppressFinalize(_f);
    }
}

(EgorBot will reply in this issue)

Activity

EgorBot

EgorBot commented on Mar 20, 2025

@EgorBot
OwnerAuthor

❌ Failed on AzureCobalt100: Job failed, see logs.

cc @AaronRobinsonMSFT (logs). EgorBot manual: link.

EgorBo

EgorBo commented on Mar 20, 2025

@EgorBo

@AaronRobinsonMSFT ugh. not sure why this compilation bug appears only in your PRs, must be something to do when "diff" changes in the VM code, I'm looking now

EgorBot

EgorBot commented on Mar 20, 2025

@EgorBot
OwnerAuthor

❌ Failed on AzureCascadeLake: Job failed, see logs.

cc @AaronRobinsonMSFT (logs). EgorBot manual: link.

EgorBo

EgorBo commented on Mar 20, 2025

@EgorBo

@EgorBot -ubuntu2404_amd -ubuntu2204_amd -pr 113715

using System;
using System.Reflection;
using System.Runtime.CompilerServices;

using BenchmarkDotNet.Attributes;

public unsafe class Bench
{
    private F _f;
    private byte[] _source;
    private byte[] _dest;
    private delegate* <ref byte, ref byte, nuint, void> _method;

    class F
    {
        ~F() { }
    }

    public Bench()
    {
        _f = new F();
        _source = new byte[10 * 1024];
        _dest = new byte[_source.Length];
        Random random = new Random();
        random.NextBytes(_source);

        var method = typeof(Buffer).GetMethod("BulkMoveWithWriteBarrier", BindingFlags.NonPublic | BindingFlags.Static)!;
        _method = (delegate* <ref byte, ref byte, nuint, void>)method.MethodHandle.GetFunctionPointer();
    }

    [Benchmark]
    public void BenchmarkBulkMoveWithWriteBarrier()
    {
        _method(ref _dest[0], ref _source[0], (nuint)_dest.Length);
    }

    [Benchmark]
    public void BenchmarkSuppressFinalize()
    {
        GC.SuppressFinalize(_f);
    }
}
EgorBot

EgorBot commented on Mar 20, 2025

@EgorBot
OwnerAuthor

Benchmark results on linux_azure_genoa

BenchmarkDotNet v0.14.0, Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AMD EPYC 9V74, 1 CPU, 16 logical and 8 physical cores
  Job-RXGAUJ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-JGPATU : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method Toolchain Mean Error Ratio
BenchmarkBulkMoveWithWriteBarrier Main 173.597 ns 0.0382 ns 1.00
BenchmarkBulkMoveWithWriteBarrier PR 183.458 ns 0.0101 ns 1.06
BenchmarkSuppressFinalize Main 1.635 ns 0.0003 ns 1.00
BenchmarkSuppressFinalize PR 2.761 ns 0.0028 ns 1.69

BDN_Artifacts.zip

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

EgorBot

EgorBot commented on Mar 20, 2025

@EgorBot
OwnerAuthor

Benchmark results on linux_azure_genoa

BenchmarkDotNet v0.14.0, Ubuntu 24.04.2 LTS (Noble Numbat)
AMD EPYC 9V74, 1 CPU, 16 logical and 8 physical cores
  Job-GJNTGZ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-LHPAMQ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method Toolchain Mean Error Ratio
BenchmarkBulkMoveWithWriteBarrier Main 172.544 ns 0.1551 ns 1.00
BenchmarkBulkMoveWithWriteBarrier PR 172.662 ns 0.0333 ns 1.00
BenchmarkSuppressFinalize Main 1.907 ns 0.0002 ns 1.00
BenchmarkSuppressFinalize PR 2.776 ns 0.0038 ns 1.46

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @EgorBo@EgorBot

      Issue actions

        Benchmarks for #113715 (AaronRobinsonMSFT) · Issue #321 · EgorBot/runtime-utils