Skip to content

Latest commit

 

History

History
41 lines (36 loc) · 4.38 KB

ArrayWhereToArray.md

File metadata and controls

41 lines (36 loc) · 4.38 KB

ArrayWhereToArray

Source

ArrayWhereToArray.cs

Results:

BenchmarkDotNet=v0.13.2, OS=macOS Monterey 12.3 (21E230) [Darwin 21.4.0]
Apple M1 Pro, 1 CPU, 10 logical and 10 physical cores
.NET SDK=7.0.101
  [Host]     : .NET 7.0.1 (7.0.122.56804), Arm64 RyuJIT AdvSIMD
  DefaultJob : .NET 7.0.1 (7.0.122.56804), Arm64 RyuJIT AdvSIMD

Method Count Mean Error StdDev Ratio RatioSD Gen0 Gen1 Gen2 Allocated Alloc Ratio
Linq 100 305.4 ns 1.06 ns 0.89 ns 1.00 0.00 0.1173 - - 736 B 1.00
LinqGenDelegate 100 378.4 ns 1.59 ns 1.41 ns 1.24 0.01 0.0381 - - 240 B 0.33
LinqGenStruct 100 313.8 ns 0.89 ns 0.83 ns 1.03 0.00 0.0381 - - 240 B 0.33
StructLinqDelegate 100 277.9 ns 0.55 ns 0.49 ns 0.91 0.00 0.0482 - - 304 B 0.41
StructLinqStruct 100 193.2 ns 0.45 ns 0.42 ns 0.63 0.00 0.0381 - - 240 B 0.33
HyperLinqDelegate 100 314.6 ns 2.64 ns 2.47 ns 1.03 0.01 0.0381 - - 240 B 0.33
HyperLinqStruct 100 236.7 ns 1.48 ns 1.38 ns 0.78 0.01 0.0381 - - 240 B 0.33
Linq 10000 44,073.4 ns 471.02 ns 440.59 ns 1.00 0.00 8.4839 0.9155 - 53576 B 1.00
LinqGenDelegate 10000 39,925.1 ns 794.29 ns 1,726.72 ns 0.90 0.04 3.1738 0.1831 - 20160 B 0.38
LinqGenStruct 10000 17,714.0 ns 614.68 ns 1,812.39 ns 0.38 0.04 3.2043 0.2136 - 20160 B 0.38
StructLinqDelegate 10000 49,767.1 ns 297.88 ns 264.06 ns 1.13 0.01 3.1738 0.1831 - 20224 B 0.38
StructLinqStruct 10000 28,825.4 ns 576.07 ns 1,567.24 ns 0.67 0.04 3.1738 0.2136 - 20160 B 0.38
HyperLinqDelegate 10000 42,049.1 ns 330.27 ns 292.78 ns 0.95 0.01 3.1738 0.1831 - 20160 B 0.38
HyperLinqStruct 10000 24,408.5 ns 578.40 ns 1,705.43 ns 0.56 0.03 3.1738 0.2136 - 20160 B 0.38
Linq 1000000 4,772,197.5 ns 13,981.39 ns 13,078.20 ns 1.00 0.00 554.6875 546.8750 539.0625 4099262 B 1.00
LinqGenDelegate 1000000 4,746,322.0 ns 27,713.14 ns 25,922.89 ns 0.99 0.01 218.7500 218.7500 218.7500 2001052 B 0.49
LinqGenStruct 1000000 4,385,233.7 ns 69,086.36 ns 64,623.43 ns 0.92 0.01 210.9375 210.9375 210.9375 2001047 B 0.49
StructLinqDelegate 1000000 5,520,543.2 ns 37,924.97 ns 35,475.04 ns 1.16 0.01 85.9375 85.9375 85.9375 2001505 B 0.49
StructLinqStruct 1000000 4,605,610.8 ns 40,198.96 ns 37,602.13 ns 0.97 0.01 164.0625 164.0625 164.0625 2001075 B 0.49
HyperLinqDelegate 1000000 4,611,330.4 ns 30,617.48 ns 28,639.61 ns 0.97 0.01 164.0625 164.0625 164.0625 2001132 B 0.49
HyperLinqStruct 1000000 3,680,417.2 ns 10,698.11 ns 10,007.02 ns 0.77 0.00 191.4063 191.4063 191.4063 2001162 B 0.49