Open EgorBot opened 1 month ago
AzureIntel
BenchmarkDotNet v0.14.0, Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 4 logical and 2 physical cores
DefaultJob : .NET 9.0.0 (9.0.24.47305), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method | Mean | Error |
---|---|---|
Equals_inline | 0.0053 ns | 0.0058 ns |
Equals_specialized | 0.2883 ns | 0.0009 ns |
Equals_generic | 2.9425 ns | 0.0088 ns |
AzureAmpere
BenchmarkDotNet v0.14.0, Ubuntu 22.04.5 LTS (Jammy Jellyfish)
AzureAmpere
DefaultJob : .NET 9.0.0 (9.0.24.47305), Arm64 RyuJIT AdvSIMD
Method | Mean | Error |
---|---|---|
Equals_inline | 0.0000 ns | 0.0000 ns |
Equals_specialized | 0.1942 ns | 0.0002 ns |
Equals_generic | 5.1165 ns | 0.0012 ns |
Processing https://github.com/dotnet/runtime/issues/10050#issuecomment-2417088353 command:
Command
-intel -arm64 ```cs using System; using BenchmarkDotNet.Attributes; using System.Runtime.CompilerServices; using BenchmarkDotNet.Running; public class StringComparisons { private string s1 = "1"; private string s2 = "1"; [Benchmark] public bool Equals_inline() => string.Equals(s1, s2); [Benchmark] public bool Equals_specialized() => EqualityComparer(EgorBot will reply in this issue)