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 #112046 #280

Open
EgorBot opened this issue Jan 31, 2025 · 2 comments
Open

EgorBot for EgorBo in #112046 #280

EgorBot opened this issue Jan 31, 2025 · 2 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Jan 31, 2025

Processing dotnet/runtime#112046 (comment) command:

Command

-amd -arm -profiler

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;

[MemoryDiagnoser, DisassemblyDiagnoser, SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.Net90)]
public class Benchmarks
{
    private const int Seed = 100;

    private static readonly int[] Chromosome = new int[59];
    private static readonly Random Random = new(Seed);

    public Benchmarks()
    {
        var genes = Enumerable.Range(1, 59).ToArray();
        Random.Shuffle(genes);
        genes.CopyTo(Chromosome.AsSpan());
    }

    [Benchmark]
    public int[] InversionMutation()
    {
        var idx1 = 0;
        var idx2 = 0;

        var chromosomeLength = Chromosome.Length;

        while (idx1 == idx2)
        {
            idx1 = Random.Next(chromosomeLength);
            idx2 = Random.Next(chromosomeLength);
        }

        if (idx1 > idx2)
        {
            (idx1, idx2) = (idx2, idx1);
        }

        Array.Reverse(Chromosome, idx1, idx2 - idx1 + 1);

        return Chromosome;
    }
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Jan 31, 2025

❌ Failed on AzureGenoa: Job failed, see logs.

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

@EgorBot
Copy link
Owner Author

EgorBot commented Jan 31, 2025

Benchmark results on linux_azure_cobalt100

BenchmarkDotNet v0.14.0, Ubuntu 24.04.1 LTS (Noble Numbat)
azure_cobalt100
  Job-EYHPHW : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-ZUUAQD : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
.NET 8.0   : .NET 8.0.12 (8.0.1224.60305), Arm64 RyuJIT AdvSIMD
.NET 9.0   : .NET 9.0.1 (9.0.124.61010), Arm64 RyuJIT AdvSIMD
Method Runtime Mean Error Ratio Code Size Allocated Alloc Ratio
InversionMutation .NET 9.0 29.46 ns 0.011 ns 1.00 844 B - NA
InversionMutation .NET 9.0 29.49 ns 0.006 ns 1.00 844 B - NA
InversionMutation .NET 8.0 30.52 ns 0.003 ns 1.04 884 B - NA
InversionMutation .NET 9.0 30.77 ns 0.008 ns 1.04 880 B - NA

BDN_Artifacts.zip

Profiling for Benchmarks_InversionMutation:

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.

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