ImmutableArray.Int32.ImmutableArrayInt32Contains.md

February 14, 2024 ยท View on GitHub

ImmutableArray.Int32.ImmutableArrayInt32Contains

Source

ImmutableArrayInt32Contains.cs

References:

Results:


BenchmarkDotNet v0.13.12, Windows 10 (10.0.19045.3996/22H2/2022Update)
Intel Core i7-7567U CPU 3.50GHz (Kaby Lake), 1 CPU, 4 logical and 2 physical cores
.NET SDK 9.0.100-preview.1.24101.2
  [Host]     : .NET 6.0.26 (6.0.2623.60508), X64 RyuJIT AVX2
  Job-THTHEP : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2
  Job-OQLBIM : .NET 9.0.0 (9.0.24.8009), X64 RyuJIT AVX2


MethodRuntimeCountMeanErrorStdDevMedianRatioRatioSDGen0AllocatedAlloc Ratio
ForLoop.NET 8.010040.33 ns0.820 ns1.037 ns40.01 nsbaseline--NA
ForeachLoop.NET 8.010042.10 ns0.865 ns0.675 ns42.22 ns1.04x slower0.03x--NA
Linq.NET 8.010015.38 ns0.336 ns0.502 ns15.23 ns2.60x faster0.08x--NA
LinqFasterer.NET 8.010046.93 ns0.382 ns0.425 ns46.82 ns1.16x slower0.03x0.2142448 BNA
StructLinq.NET 8.010077.56 ns1.157 ns1.332 ns77.20 ns1.92x slower0.03x0.015332 BNA
StructLinq_ValueDelegate.NET 8.0100161.17 ns0.893 ns0.746 ns161.18 ns3.97x slower0.13x--NA
Hyperlinq.NET 8.010018.60 ns0.310 ns0.242 ns18.55 ns2.19x faster0.06x0.015332 BNA
Hyperlinq_SIMD.NET 8.010013.30 ns0.133 ns0.148 ns13.27 ns3.04x faster0.07x--NA
ForLoop.NET 9.010041.90 ns0.538 ns0.420 ns41.74 nsbaseline--NA
ForeachLoop.NET 9.010044.42 ns0.922 ns1.062 ns44.01 ns1.07x slower0.03x--NA
Linq.NET 9.010013.64 ns0.302 ns0.662 ns13.24 ns3.02x faster0.14x--NA
LinqFasterer.NET 9.010049.81 ns0.328 ns0.322 ns49.79 ns1.19x slower0.01x0.2142448 BNA
StructLinq.NET 9.010097.18 ns1.860 ns1.827 ns96.61 ns2.32x slower0.04x0.015332 BNA
StructLinq_ValueDelegate.NET 9.0100128.10 ns2.178 ns2.508 ns128.08 ns3.06x slower0.07x--NA
Hyperlinq.NET 9.010018.77 ns0.168 ns0.149 ns18.77 ns2.24x faster0.02x0.015332 BNA
Hyperlinq_SIMD.NET 9.010017.89 ns0.222 ns0.273 ns17.78 ns2.34x faster0.05x--NA