Registry Mirror
Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Benchmarks for #117800 (hamarb123) #452

Open

Description

@EgorBot

Processing dotnet/runtime#117800 (comment) command:

Command

-amd -arm -mono

using System;
using System.Linq;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

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

public class Bench
{
    public unsafe byte* ptr;
    
    [GlobalSetup]
    public unsafe void Setup()
    {
        ptr = (byte*)NativeMemory.AlignedAlloc(4096, 4096);
        new Random(42).NextBytes(MemoryMarshal.CreateSpan(ref *ptr, 4096));
        MemoryMarshal.CreateSpan(ref *ptr, 4096).Replace<byte>(42, 0x42);
    }
    
    [Benchmark]
    public unsafe bool Test()
    {
        return MemoryMarshal.CreateSpan(ref *ptr, 4096).Contains((byte)42);
    }
}

(EgorBot will reply in this issue)

Activity

  1. EgorBot commented on Jul 26, 2025

    @EgorBot
    OwnerAuthor

    Benchmark results on linux_azure_genoa

    BenchmarkDotNet v0.15.0, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
    AMD EPYC 9V74, 1 CPU, 8 logical and 4 physical cores
      Job-GYTTRD : .NET 10.0.0 (42.42.42.42424) using MonoVM, X64 X86Base
      Job-VRUYDB : .NET 10.0.0 (42.42.42.42424) using MonoVM, X64 X86Base
    
    Method Toolchain Mean Error Ratio
    Test Main 362.5 ns 0.11 ns 1.00
    Test PR 354.4 ns 0.14 ns 0.98

    BDN_Artifacts.zip

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

  2. EgorBot commented on Jul 26, 2025

    @EgorBot
    OwnerAuthor

    Benchmark results on linux_azure_cobalt100

    BenchmarkDotNet v0.15.0, Linux Ubuntu 24.04.2 LTS (Noble Numbat)
    Neoverse-N2, 8 physical cores
      Job-JRZSPN : .NET 10.0.0 (42.42.42.42424) using MonoVM, Arm64 ArmBase
      Job-UOSJUM : .NET 10.0.0 (42.42.42.42424) using MonoVM, Arm64 ArmBase
    
    Method Toolchain Mean Error Ratio
    Test Main 336.8 ns 0.04 ns 1.00
    Test PR 386.0 ns 0.02 ns 1.15

    BDN_Artifacts.zip

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions