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

Benchmarks for #117332 (EgorBo) #421

Open

Description

@EgorBot

Processing dotnet/runtime#117332 (comment) command:

Command

-amd -arm

using System;
using System.Collections.Generic;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

public class Bench
{
    static readonly Dictionary<string, int> Dictionary = new(StringComparer.OrdinalIgnoreCase)
    {
        { "Hi", 1 },
        { "DOTNET_SKIP_FIRST_TIME_EXPERIENCE", 2 }
    };

    [Benchmark]
    public int LookupLong() => Dictionary["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"];

    [Benchmark]
    public int LookupShort() => Dictionary["Hi"];
}

(EgorBot will reply in this issue)

Activity

  1. EgorBot commented on Jul 5, 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-LJEBNV : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
      Job-FJNVCY : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
    
    Method Toolchain Mean Error Ratio
    LookupLong Main 19.550 ns 0.0076 ns 1.00
    LookupLong PR 4.519 ns 0.0395 ns 0.23
    LookupShort Main 4.827 ns 0.0037 ns 1.00
    LookupShort PR 3.561 ns 0.0048 ns 0.74

    BDN_Artifacts.zip

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

  2. EgorBot commented on Jul 5, 2025

    @EgorBot
    OwnerAuthor

    Benchmark results on linux_azure_cobalt100

    BenchmarkDotNet v0.14.0, Ubuntu 24.04.2 LTS (Noble Numbat)
    azure_cobalt100
      Job-AFXIHG : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
      Job-SIBRXU : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
    
    Method Toolchain Mean Error Ratio
    LookupLong Main 23.079 ns 0.0039 ns 1.00
    LookupLong PR 7.107 ns 0.0148 ns 0.31
    LookupShort Main 6.260 ns 0.0036 ns 1.00
    LookupShort PR 4.458 ns 0.0024 ns 0.71

    BDN_Artifacts.zip

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

  3. neon-sunset commented on Jul 6, 2025

    @neon-sunset
  4. EgorBot commented on Jul 6, 2025

    @EgorBot
    OwnerAuthor

    ❌ Benchmark validation failed

    cc @neon-sunset (logs). EgorBot manual: link.

  5. neon-sunset commented on Jul 6, 2025

    @neon-sunset

    @EgorBot -amd

    using BenchmarkDotNet.Attributes;
    using Microsoft.AspNetCore.Http;
    
    public class Bench
    {
        [Benchmark]
        public HttpContext CreateTestHttpContext()
        {
            var httpContext = new DefaultHttpContext();
            httpContext.Request.Method = "GET";
            httpContext.Request.Path = "/test";
            httpContext.Request.QueryString = new QueryString("?param=value");
            httpContext.Request.Scheme = "http";
            httpContext.Request.Host = new HostString("example.com");
            httpContext.Request.Headers.UserAgent = "BenchmarkTest/1.0";
            httpContext.Request.Headers.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
            httpContext.Request.Headers.AcceptLanguage = "en-US,en;q=0.5";
            httpContext.Request.Headers.AcceptEncoding = "gzip, deflate, br";
            httpContext.Request.Headers.Connection = "keep-alive";
            return httpContext;
        }
    }
    
  6. EgorBot commented on Jul 6, 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, 8 logical and 4 physical cores
    RatioSD=?
    
    Method Toolchain Mean Error Ratio
    CreateTestHttpContext Main NA NA ?
    CreateTestHttpContext PR NA NA ?
    Benchmarks with issues:
    Bench.CreateTestHttpContext: Job-ENOFZG(Toolchain=Main)
    Bench.CreateTestHttpContext: Job-BJTOYI(Toolchain=PR)

    BDN_Artifacts.zip

    cc @neon-sunset (agent_logs.txt). EgorBot manual: link.

  7. neon-sunset commented on Jul 6, 2025

    @neon-sunset

    @EgorBot -amd -arm

    using BenchmarkDotNet.Attributes;
    
    public class Bench
    {
        public record GeoIP
        (
            double Latitude,
            double Longitude,
            string? CountryCode,
            long ASN
        );
    
        public record Context
        (
            DayOfWeek Decision,
            string Status,
            string HTTPMethod,
            string EventCode,
            string ServerCode,
            GeoIP GeoLookup
        );
    
        readonly Context testContext = new(
            Decision: DayOfWeek.Monday,
            Status: "200 OK",
            HTTPMethod: "GET",
            EventCode: "TEST_EVENT",
            ServerCode: "SERVER_123",
            GeoLookup: new(
                Latitude: 37.7749,
                Longitude: -122.4194,
                CountryCode: "US",
                ASN: 12345
            )
        );
    
        [Benchmark]
        public Dictionary<string, string> CreateLabels() => CreateLabels(testContext);
    
        static Dictionary<string, string> CreateLabels(Context context) => new(7)
        {
            ["ASN"] = context.GeoLookup.ASN.ToString(),
            ["Country"] = context.GeoLookup.CountryCode ?? "",
            ["EventCode"] = context.EventCode,
            ["Method"] = context.HTTPMethod,
            ["Status"] = context.Status,
            ["Action"] = context.Decision.ToString(),
            ["ServerCode"] = context.ServerCode
        };
    }
    
  8. EgorBot commented on Jul 6, 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, 8 logical and 4 physical cores
      Job-NYDMFB : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
      Job-AZHJBV : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
    
    Method Toolchain Mean Error Ratio
    CreateLabels Main 84.26 ns 0.063 ns 1.00
    CreateLabels PR 84.76 ns 0.055 ns 1.01

    BDN_Artifacts.zip

    cc @neon-sunset (agent_logs.txt). EgorBot manual: link.

  9. EgorBot commented on Jul 6, 2025

    @EgorBot
    OwnerAuthor

    Benchmark results on linux_azure_cobalt100

    BenchmarkDotNet v0.14.0, Ubuntu 24.04.2 LTS (Noble Numbat)
    azure_cobalt100
      Job-NAAZXH : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
      Job-QOZEOB : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
    
    Method Toolchain Mean Error Ratio
    CreateLabels Main 117.4 ns 0.57 ns 1.00
    CreateLabels PR 116.8 ns 0.29 ns 1.00

    BDN_Artifacts.zip

    cc @neon-sunset (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