Closed EgorBot closed 2 weeks ago
Linux-SapphireLake
BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
Intel Xeon Platinum 8488C, 1 CPU, 16 logical and 8 physical cores
Job-JTPMZQ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Job-CIOAIL : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
EnvironmentVariables=DOTNET_JitDisasm=Test
Method | Toolchain | Mean | Error | Ratio |
---|---|---|---|---|
Test | Main | 0.2974 ns | 0.0308 ns | 1.01 |
Test | PR | 0.0036 ns | 0.0074 ns | 0.01 |
@EgorBot -gcp_intel
using BenchmarkDotNet.Attributes;
public class C
{
private static readonly int[] _perm = [1, 2, 3, 4];
private int Index = 1;
[Benchmark]
public int Test()
{
int index = Index;
return _perm[index & (_perm.Length - 1)];
}
}
❌ emeraldrapids
can't be used with linux
. See:
Targets: OSes:
azure_ampere linux
azure_milano linux
azure_icelake linux
azure_cobalt100 linux
azure_genoa linux
aws_m1 macos
aws_m1ultra macos
aws_m2 macos
aws_m2pro macos
aws_macx86 macos
aws_sapphirelake linux, windows
aws_icelake linux, windows
aws_genoa linux, windows
aws_milano linux, windows
aws_graviton2 linux
aws_graviton3 linux
aws_graviton4 linux
gcp_ampere linux
gcp_axion linux
gcp_milano linux
gcp_cascadelake linux
gcp_sapphirelake linux
gcp_emeraldrapids linux
cc @EgorBo
@EgorBot -gcp_intel
using BenchmarkDotNet.Attributes;
public class C
{
private static readonly int[] _perm = [1, 2, 3, 4];
private int Index = 1;
[Benchmark]
public int Test()
{
int index = Index;
return _perm[index & (_perm.Length - 1)];
}
}
@EgorBot -gcp_intel
using BenchmarkDotNet.Attributes;
public class C
{
private static readonly int[] _perm = [1, 2, 3, 4];
private int Index = 1;
[Benchmark]
public int Test()
{
int index = Index;
return _perm[index & (_perm.Length - 1)];
}
}
@EgorBot -gcp_intel
using BenchmarkDotNet.Attributes;
public class C
{
private static readonly int[] _perm = [1, 2, 3, 4];
private int Index = 1;
[Benchmark]
public int Test()
{
int index = Index;
return _perm[index & (_perm.Length - 1)];
}
}
Debian12-emeraldrapids
BenchmarkDotNet v0.14.0, Debian GNU/Linux 12 (bookworm)
INTEL XEON PLATINUM 8581C CPU 2.30GHz, 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
StdDev=0.0064 ns Median=0.0057 ns
Method | Mean | Error |
---|---|---|
Test | 0.0086 ns | 0.0068 ns |
Processing https://github.com/dotnet/runtime/pull/109466#issuecomment-2453485256 command:
Command
-intel -arm64 --envvars DOTNET_JitDisasm:Test ```cs using BenchmarkDotNet.Attributes; public class C { private static readonly int[] _perm = [1, 2, 3, 4]; private int Index = 1; [Benchmark] public int Test() { int index = Index; return _perm[index & (_perm.Length - 1)]; } } ```(EgorBot will reply in this issue)