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) #453

Open

Description

@EgorBot

Processing dotnet/runtime#117800 (comment) command:

Command

-amd -arm -mono --envvars MONO_ENV_OPTIONS:"--interpreter"

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-SFUMUZ : .NET 10.0.0 (42.42.42.42424) using MonoVM, X64 AOT VectorSize=128
      Job-QYNNMP : .NET 10.0.0 (42.42.42.42424) using MonoVM, X64 AOT VectorSize=128
    EnvironmentVariables=MONO_ENV_OPTIONS="--interpreter"
    
    Method Toolchain Mean Error Ratio
    Test Main 3.756 μs 0.0750 μs 1.00
    Test PR 3.746 μs 0.0859 μs 1.00

    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-LHQUIY : .NET 10.0.0 (42.42.42.42424) using MonoVM, Arm64 AOT VectorSize=128
      Job-JQRPUS : .NET 10.0.0 (42.42.42.42424) using MonoVM, Arm64 AOT VectorSize=128
    EnvironmentVariables=MONO_ENV_OPTIONS="--interpreter"  RatioSD=0.05
    
    Method Toolchain Mean Error Ratio
    Test Main 3.378 μs 0.0673 μs 1.00
    Test PR 3.335 μs 0.0667 μs 0.99

    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