Array.Int32.ArrayInt32Contains.md

February 14, 2024 ยท View on GitHub

Array.Int32.ArrayInt32Contains

Source

ArrayInt32Contains.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.010041.67 ns0.872 ns1.457 ns41.28 nsbaseline--NA
ForeachLoop.NET 8.010041.07 ns0.863 ns1.642 ns40.47 ns1.01x faster0.05x--NA
Linq.NET 8.010012.03 ns0.332 ns0.965 ns11.55 ns3.50x faster0.30x--NA
LinqFaster.NET 8.010012.42 ns0.286 ns0.811 ns12.10 ns3.31x faster0.21x--NA
LinqFaster_SIMD.NET 8.010019.12 ns0.359 ns0.280 ns19.00 ns2.17x faster0.07x--NA
LinqFasterer.NET 8.010013.62 ns0.372 ns1.067 ns13.08 ns3.08x faster0.25x--NA
LinqAF.NET 8.010015.04 ns0.326 ns0.952 ns14.72 ns2.75x faster0.18x--NA
StructLinq.NET 8.010075.90 ns1.750 ns5.161 ns74.07 ns1.82x slower0.15x0.015332 BNA
StructLinq_ValueDelegate.NET 8.010050.27 ns1.030 ns2.283 ns49.87 ns1.21x slower0.07x--NA
Hyperlinq.NET 8.010018.76 ns0.231 ns0.181 ns18.71 ns2.21x faster0.07x0.015332 BNA
Hyperlinq_SIMD.NET 8.010012.39 ns0.279 ns0.298 ns12.27 ns3.38x faster0.12x--NA
Faslinq.NET 8.010077.18 ns1.511 ns3.411 ns75.89 ns1.87x slower0.12x0.030564 BNA
ForLoop.NET 9.010041.49 ns0.863 ns1.027 ns41.43 nsbaseline--NA
ForeachLoop.NET 9.010042.81 ns0.888 ns0.987 ns42.58 ns1.03x slower0.04x--NA
Linq.NET 9.010012.36 ns0.280 ns0.520 ns12.13 ns3.36x faster0.14x--NA
LinqFaster.NET 9.010014.36 ns0.309 ns0.331 ns14.29 ns2.90x faster0.11x--NA
LinqFaster_SIMD.NET 9.010020.36 ns0.403 ns0.357 ns20.21 ns2.05x faster0.07x--NA
LinqFasterer.NET 9.010015.96 ns0.127 ns0.099 ns15.94 ns2.61x faster0.08x--NA
LinqAF.NET 9.010015.67 ns0.149 ns0.117 ns15.63 ns2.66x faster0.09x--NA
StructLinq.NET 9.010071.04 ns1.409 ns1.100 ns70.77 ns1.71x slower0.05x0.015332 BNA
StructLinq_ValueDelegate.NET 9.010067.83 ns1.097 ns0.973 ns67.54 ns1.63x slower0.06x--NA
Hyperlinq.NET 9.010017.88 ns0.112 ns0.093 ns17.89 ns2.33x faster0.07x0.015332 BNA
Hyperlinq_SIMD.NET 9.010018.34 ns0.394 ns0.454 ns18.18 ns2.27x faster0.08x--NA
Faslinq.NET 9.0100115.45 ns1.732 ns1.535 ns115.28 ns2.77x slower0.09x0.030564 BNA