Array.Int32.ArrayInt32Distinct.md

February 14, 2024 · View on GitHub

Array.Int32.ArrayInt32Distinct

Source

ArrayInt32Distinct.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


MethodRuntimeDuplicatesCountMeanErrorStdDevMedianRatioRatioSDGen0AllocatedAlloc Ratio
ForLoop.NET 8.041002.884 μs0.0550 μs0.0430 μs2.868 μsbaseline2.86486000 B
ForeachLoop.NET 8.041002.868 μs0.0346 μs0.0324 μs2.865 μs1.00x faster0.02x2.86486000 B1.000x more
Linq.NET 8.041003.685 μs0.0733 μs0.1654 μs3.603 μs1.29x slower0.06x2.86485992 B1.001x less
LinqFasterer.NET 8.041003.725 μs0.0843 μs0.2364 μs3.629 μs1.28x slower0.08x4.42129272 B1.545x more
LinqAF.NET 8.041005.854 μs0.1137 μs0.3133 μs5.733 μs2.01x slower0.11x5.928012400 B2.067x more
StructLinq.NET 8.041002.762 μs0.0517 μs0.0404 μs2.758 μs1.04x faster0.02x0.015332 B187.500x less
StructLinq_ValueDelegate.NET 8.041002.772 μs0.0515 μs0.1163 μs2.743 μs1.03x faster0.05x--NA
Hyperlinq.NET 8.041002.588 μs0.0504 μs0.1018 μs2.553 μs1.13x faster0.04x--NA
ForLoop.NET 9.041002.987 μs0.0595 μs0.1578 μs2.911 μsbaseline2.86486000 B
ForeachLoop.NET 9.041002.894 μs0.0322 μs0.0302 μs2.881 μs1.05x faster0.06x2.86106000 B1.000x more
Linq.NET 9.041003.986 μs0.0790 μs0.1751 μs3.911 μs1.34x slower0.09x2.86105992 B1.001x less
LinqFasterer.NET 9.041003.574 μs0.0666 μs0.1622 μs3.496 μs1.19x slower0.08x4.42129272 B1.545x more
LinqAF.NET 9.041005.827 μs0.0918 μs0.1057 μs5.784 μs1.95x slower0.11x5.928012400 B2.067x more
StructLinq.NET 9.041002.706 μs0.0384 μs0.0321 μs2.698 μs1.11x faster0.06x0.015332 B187.500x less
StructLinq_ValueDelegate.NET 9.041002.700 μs0.0531 μs0.0710 μs2.671 μs1.10x faster0.05x--NA
Hyperlinq.NET 9.041002.956 μs0.0563 μs0.0553 μs2.947 μs1.02x faster0.05x--NA