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 #109036 #162

Open
EgorBot opened this issue Nov 18, 2024 · 2 comments
Open

EgorBot for EgorBo in #109036 #162

EgorBot opened this issue Nov 18, 2024 · 2 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Nov 18, 2024

Processing dotnet/runtime#109036 (comment) command:

Command

-amd -intel --envvars DOTNET_JitDisasm:Bestcase_IgnoreCase

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

public class Bench
{
    string s = "https://pkgs.dev.azure.com/dnceng/public/packaging/dotnet10/";

    [Benchmark]
    public bool Bestcase() => 
        s.StartsWith("https://pkgs.dev.azure.com/dnceng/public/pack", StringComparison.Ordinal);
    
    [Benchmark]
    public bool Bestcase_IgnoreCase() => 
        s.StartsWith("https://pkgs.dev.azure.com/dnceng/public/pack", StringComparison.OrdinalIgnoreCase);

    // Worst case: differs at 1st char:

    [Benchmark]
    public bool Worstcase() => 
        s.StartsWith("Xttps://pkgs.dev.azure.com/dnceng/public/pack", StringComparison.Ordinal);
    
    [Benchmark]
    public bool Worstcase_IgnoreCase() => 
        s.StartsWith("Xttps://pkgs.dev.azure.com/dnceng/public/pack", StringComparison.OrdinalIgnoreCase);
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Nov 18, 2024

Benchmark results on linux_milano

BenchmarkDotNet v0.14.0, Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AMD EPYC 7763, 1 CPU, 8 logical and 4 physical cores
  Job-OOCTCF : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX2
  Job-WTYLTX : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX2
EnvironmentVariables=DOTNET_JitDisasm=Bestcase_IgnoreCase
Method Toolchain Mean Error Ratio
Bestcase Main 4.348 ns 0.0008 ns 1.00
Bestcase PR 4.359 ns 0.0018 ns 1.00
Bestcase_IgnoreCase Main 6.200 ns 0.0009 ns 1.00
Bestcase_IgnoreCase PR 6.518 ns 0.0013 ns 1.05
Worstcase Main 2.181 ns 0.0003 ns 1.00
Worstcase PR 1.661 ns 0.0041 ns 0.76
Worstcase_IgnoreCase Main 4.962 ns 0.0013 ns 1.00
Worstcase_IgnoreCase PR 5.264 ns 0.0046 ns 1.06

BDN_Artifacts.zip

cc @EgorBo (agent_logs.txt)

@EgorBot
Copy link
Owner Author

EgorBot commented Nov 18, 2024

Benchmark results on linux_icelake

BenchmarkDotNet v0.14.0, Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 8 logical and 4 physical cores
  Job-ITFDTJ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-TBRSZA : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
EnvironmentVariables=DOTNET_JitDisasm=Bestcase_IgnoreCase
Method Toolchain Mean Error Ratio
Bestcase Main 0.7713 ns 0.0002 ns 1.00
Bestcase PR 0.7897 ns 0.0003 ns 1.02
Bestcase_IgnoreCase Main 1.2811 ns 0.0013 ns 1.00
Bestcase_IgnoreCase PR 2.3924 ns 0.0010 ns 1.87
Worstcase Main 0.7716 ns 0.0001 ns 1.00
Worstcase PR 1.5712 ns 0.0013 ns 2.04
Worstcase_IgnoreCase Main 2.5611 ns 0.0003 ns 1.00
Worstcase_IgnoreCase PR 1.2986 ns 0.0003 ns 0.51

BDN_Artifacts.zip

cc @EgorBo (agent_logs.txt)

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