Skip to content

Commit 4e90475

Browse files
authored
Benchmark fixes (#352)
1 parent 6199b1a commit 4e90475

61 files changed

Lines changed: 801 additions & 1334 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Benchmarks/AllBenchmarks.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,37 @@
1717
BenchmarkDotNet=v0.12.1.1521-nightly, OS=Windows 10.0.19043
1818
Intel Core i7-7567U CPU 3.50GHz (Kaby Lake), 1 CPU, 4 logical and 2 physical cores
1919
.NET SDK=6.0.100-preview.2.21155.3
20-
[Host] : .NET 6.0.0 (6.0.21.15406), X64 RyuJIT
21-
.NET 6.0 : .NET 6.0.0 (6.0.21.15406), X64 RyuJIT
20+
[Host] : .NET 6.0.0 (6.0.21.15406), X64 RyuJIT
21+
Job-KXCEYC : .NET 6.0.0 (6.0.21.15406), X64 RyuJIT
2222

23-
Job=.NET 6.0 Runtime=.NET 6.0
23+
Runtime=.NET 6.0
2424

2525
```
26-
| Method | Categories | Count | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
27-
|------------------------------------ |-------------------------- |------ |-----------:|---------:|---------:|------:|--------:|-------:|------:|------:|----------:|
28-
| Linq_Array | Array | 100 | 608.4 ns | 8.10 ns | 7.96 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
29-
| Hyperlinq_Array | Array | 100 | 221.1 ns | 0.87 ns | 0.77 ns | 0.36 | 0.01 | - | - | - | - |
30-
| | | | | | | | | | | | |
31-
| Linq_Enumerable_Value | Enumerable_Value | 100 | 781.2 ns | 9.45 ns | 7.38 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
32-
| Hyperlinq_Enumerable_Value | Enumerable_Value | 100 | 208.2 ns | 1.49 ns | 1.17 ns | 0.27 | 0.00 | - | - | - | - |
33-
| | | | | | | | | | | | |
34-
| Linq_Collection_Value | Collection_Value | 100 | 770.5 ns | 4.33 ns | 3.84 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
35-
| Hyperlinq_Collection_Value | Collection_Value | 100 | 212.3 ns | 1.64 ns | 1.28 ns | 0.28 | 0.00 | - | - | - | - |
36-
| | | | | | | | | | | | |
37-
| Linq_List_Value | List_Value | 100 | 752.9 ns | 10.18 ns | 9.52 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
38-
| Hyperlinq_List_Value | List_Value | 100 | 920.3 ns | 13.31 ns | 11.79 ns | 1.22 | 0.02 | - | - | - | - |
39-
| | | | | | | | | | | | |
40-
| Linq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 1,920.2 ns | 8.37 ns | 6.99 ns | 1.00 | 0.00 | 0.0191 | - | - | 40 B |
41-
| Hyperlinq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 279.0 ns | 1.49 ns | 1.40 ns | 0.15 | 0.00 | - | - | - | - |
42-
| | | | | | | | | | | | |
43-
| Linq_Enumerable_Reference | Enumerable_Reference | 100 | 537.2 ns | 10.22 ns | 11.77 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
44-
| Hyperlinq_Enumerable_Reference | Enumerable_Reference | 100 | 608.8 ns | 5.31 ns | 4.70 ns | 1.13 | 0.03 | 0.0153 | - | - | 32 B |
45-
| | | | | | | | | | | | |
46-
| Linq_Collection_Reference | Collection_Reference | 100 | 528.5 ns | 3.67 ns | 3.26 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
47-
| Hyperlinq_Collection_Reference | Collection_Reference | 100 | 556.2 ns | 3.01 ns | 2.67 ns | 1.05 | 0.01 | 0.0153 | - | - | 32 B |
48-
| | | | | | | | | | | | |
49-
| Linq_List_Reference | List_Reference | 100 | 581.1 ns | 11.64 ns | 10.32 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
50-
| Hyperlinq_List_Reference | List_Reference | 100 | 930.1 ns | 15.48 ns | 15.20 ns | 1.60 | 0.03 | - | - | - | - |
51-
| | | | | | | | | | | | |
52-
| Linq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 1,856.0 ns | 36.36 ns | 34.01 ns | 1.00 | 0.00 | 0.0191 | - | - | 40 B |
53-
| Hyperlinq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 302.0 ns | 1.03 ns | 0.86 ns | 0.16 | 0.00 | 0.0191 | - | - | 40 B |
26+
| Method | Categories | Count | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
27+
|------------------------------------ |-------------------------- |------ |-----------:|--------:|--------:|------:|--------:|-------:|------:|------:|----------:|
28+
| Linq_Array | Array | 100 | 595.0 ns | 4.34 ns | 4.06 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
29+
| Hyperlinq_Array | Array | 100 | 192.7 ns | 0.61 ns | 0.51 ns | 0.32 | 0.00 | - | - | - | - |
30+
| | | | | | | | | | | | |
31+
| Linq_Enumerable_Value | Enumerable_Value | 100 | 749.5 ns | 2.53 ns | 2.37 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
32+
| Hyperlinq_Enumerable_Value | Enumerable_Value | 100 | 228.9 ns | 2.89 ns | 2.42 ns | 0.31 | 0.00 | - | - | - | - |
33+
| | | | | | | | | | | | |
34+
| Linq_Collection_Value | Collection_Value | 100 | 754.4 ns | 7.67 ns | 7.17 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
35+
| Hyperlinq_Collection_Value | Collection_Value | 100 | 206.9 ns | 1.72 ns | 1.34 ns | 0.27 | 0.00 | - | - | - | - |
36+
| | | | | | | | | | | | |
37+
| Linq_List_Value | List_Value | 100 | 748.2 ns | 3.10 ns | 2.90 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
38+
| Hyperlinq_List_Value | List_Value | 100 | 611.6 ns | 2.82 ns | 2.50 ns | 0.82 | 0.00 | - | - | - | - |
39+
| | | | | | | | | | | | |
40+
| Linq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 1,871.6 ns | 3.28 ns | 3.07 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
41+
| Hyperlinq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 274.0 ns | 0.63 ns | 0.59 ns | 0.15 | 0.00 | - | - | - | - |
42+
| | | | | | | | | | | | |
43+
| Linq_Enumerable_Reference | Enumerable_Reference | 100 | 731.6 ns | 9.35 ns | 8.75 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
44+
| Hyperlinq_Enumerable_Reference | Enumerable_Reference | 100 | 777.0 ns | 3.04 ns | 2.54 ns | 1.06 | 0.02 | 0.0153 | - | - | 32 B |
45+
| | | | | | | | | | | | |
46+
| Linq_Collection_Reference | Collection_Reference | 100 | 723.4 ns | 2.88 ns | 2.55 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
47+
| Hyperlinq_Collection_Reference | Collection_Reference | 100 | 757.4 ns | 4.79 ns | 4.48 ns | 1.05 | 0.01 | 0.0153 | - | - | 32 B |
48+
| | | | | | | | | | | | |
49+
| Linq_List_Reference | List_Reference | 100 | 726.2 ns | 4.17 ns | 3.69 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
50+
| Hyperlinq_List_Reference | List_Reference | 100 | 610.9 ns | 1.23 ns | 1.15 ns | 0.84 | 0.00 | - | - | - | - |
51+
| | | | | | | | | | | | |
52+
| Linq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 1,866.5 ns | 4.85 ns | 3.79 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
53+
| Hyperlinq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 302.5 ns | 1.93 ns | 1.80 ns | 0.16 | 0.00 | 0.0153 | - | - | 32 B |

Benchmarks/AnyBenchmarks.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[AnyBenchmarks.cs](../NetFabric.Hyperlinq.Benchmarks/Benchmarks/AnyBenchmarks.cs)
55

66
### References:
7-
- Linq: 5.0.3
7+
- Linq: 6.0.0-preview.2.21154.6
88
- System.Linq.Async: [5.0.0](https://www.nuget.org/packages/System.Linq.Async/5.0.0)
99
- System.Interactive: [5.0.0](https://www.nuget.org/packages/System.Interactive/5.0.0)
1010
- System.Interactive.Async: [5.0.0](https://www.nuget.org/packages/System.Interactive.Async/5.0.0)
@@ -14,40 +14,40 @@
1414
### Results:
1515
``` ini
1616

17-
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19043
17+
BenchmarkDotNet=v0.12.1.1521-nightly, OS=Windows 10.0.19043
1818
Intel Core i7-7567U CPU 3.50GHz (Kaby Lake), 1 CPU, 4 logical and 2 physical cores
19-
.NET Core SDK=6.0.100-preview.1.21103.13
20-
[Host] : .NET Core 5.0.3 (CoreCLR 5.0.321.7212, CoreFX 5.0.321.7212), X64 RyuJIT
21-
.NET Core 5.0 : .NET Core 5.0.3 (CoreCLR 5.0.321.7212, CoreFX 5.0.321.7212), X64 RyuJIT
19+
.NET SDK=6.0.100-preview.2.21155.3
20+
[Host] : .NET 6.0.0 (6.0.21.15406), X64 RyuJIT
21+
Job-KXCEYC : .NET 6.0.0 (6.0.21.15406), X64 RyuJIT
2222

23-
Job=.NET Core 5.0 Runtime=.NET Core 5.0
23+
Runtime=.NET 6.0
2424

2525
```
2626
| Method | Categories | Count | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
2727
|------------------------------------ |-------------------------- |------ |----------:|----------:|----------:|------:|--------:|-------:|------:|------:|----------:|
28-
| Linq_Array | Array | 100 | 9.399 ns | 0.0537 ns | 0.0419 ns | 1.00 | 0.00 | - | - | - | - |
29-
| Hyperlinq_Array | Array | 100 | 7.945 ns | 0.0236 ns | 0.0209 ns | 0.85 | 0.00 | - | - | - | - |
28+
| Linq_Array | Array | 100 | 8.852 ns | 0.0332 ns | 0.0310 ns | 1.00 | 0.00 | - | - | - | - |
29+
| Hyperlinq_Array | Array | 100 | 7.780 ns | 0.0216 ns | 0.0181 ns | 0.88 | 0.00 | - | - | - | - |
3030
| | | | | | | | | | | | |
31-
| Linq_Enumerable_Value | Enumerable_Value | 100 | 20.241 ns | 0.0537 ns | 0.0502 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
32-
| Hyperlinq_Enumerable_Value | Enumerable_Value | 100 | 10.652 ns | 0.0210 ns | 0.0164 ns | 0.53 | 0.00 | - | - | - | - |
31+
| Linq_Enumerable_Value | Enumerable_Value | 100 | 22.005 ns | 0.1641 ns | 0.1371 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
32+
| Hyperlinq_Enumerable_Value | Enumerable_Value | 100 | 12.334 ns | 0.0213 ns | 0.0189 ns | 0.56 | 0.00 | - | - | - | - |
3333
| | | | | | | | | | | | |
34-
| Linq_Collection_Value | Collection_Value | 100 | 4.684 ns | 0.0171 ns | 0.0160 ns | 1.00 | 0.00 | - | - | - | - |
35-
| Hyperlinq_Collection_Value | Collection_Value | 100 | 8.330 ns | 0.0272 ns | 0.0255 ns | 1.78 | 0.01 | - | - | - | - |
34+
| Linq_Collection_Value | Collection_Value | 100 | 5.165 ns | 0.0671 ns | 0.0628 ns | 1.00 | 0.00 | - | - | - | - |
35+
| Hyperlinq_Collection_Value | Collection_Value | 100 | 8.206 ns | 0.0258 ns | 0.0229 ns | 1.59 | 0.02 | - | - | - | - |
3636
| | | | | | | | | | | | |
37-
| Linq_List_Value | List_Value | 100 | 5.399 ns | 0.0244 ns | 0.0229 ns | 1.00 | 0.00 | - | - | - | - |
38-
| Hyperlinq_List_Value | List_Value | 100 | 1.548 ns | 0.0258 ns | 0.0452 ns | 0.29 | 0.01 | - | - | - | - |
37+
| Linq_List_Value | List_Value | 100 | 5.672 ns | 0.0396 ns | 0.0331 ns | 1.00 | 0.00 | - | - | - | - |
38+
| Hyperlinq_List_Value | List_Value | 100 | 1.553 ns | 0.0118 ns | 0.0111 ns | 0.27 | 0.00 | - | - | - | - |
3939
| | | | | | | | | | | | |
40-
| Linq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 67.638 ns | 0.2277 ns | 0.2130 ns | 1.00 | 0.00 | 0.0191 | - | - | 40 B |
41-
| Hyperlinq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 64.182 ns | 0.1641 ns | 0.1281 ns | 0.95 | 0.00 | - | - | - | - |
40+
| Linq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 62.236 ns | 0.3114 ns | 0.2760 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
41+
| Hyperlinq_AsyncEnumerable_Value | AsyncEnumerable_Value | 100 | 52.144 ns | 0.1382 ns | 0.1293 ns | 0.84 | 0.00 | - | - | - | - |
4242
| | | | | | | | | | | | |
43-
| Linq_Enumerable_Reference | Enumerable_Reference | 100 | 17.738 ns | 0.0473 ns | 0.0369 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
44-
| Hyperlinq_Enumerable_Reference | Enumerable_Reference | 100 | 9.871 ns | 0.0625 ns | 0.0554 ns | 0.56 | 0.00 | 0.0153 | - | - | 32 B |
43+
| Linq_Enumerable_Reference | Enumerable_Reference | 100 | 21.951 ns | 0.1458 ns | 0.1364 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
44+
| Hyperlinq_Enumerable_Reference | Enumerable_Reference | 100 | 13.268 ns | 0.0782 ns | 0.0653 ns | 0.60 | 0.01 | 0.0153 | - | - | 32 B |
4545
| | | | | | | | | | | | |
46-
| Linq_Collection_Reference | Collection_Reference | 100 | 4.702 ns | 0.0219 ns | 0.0194 ns | 1.00 | 0.00 | - | - | - | - |
47-
| Hyperlinq_Collection_Reference | Collection_Reference | 100 | 1.799 ns | 0.0076 ns | 0.0067 ns | 0.38 | 0.00 | - | - | - | - |
46+
| Linq_Collection_Reference | Collection_Reference | 100 | 5.295 ns | 0.0266 ns | 0.0249 ns | 1.00 | 0.00 | - | - | - | - |
47+
| Hyperlinq_Collection_Reference | Collection_Reference | 100 | 1.553 ns | 0.0143 ns | 0.0126 ns | 0.29 | 0.00 | - | - | - | - |
4848
| | | | | | | | | | | | |
49-
| Linq_List_Reference | List_Reference | 100 | 5.409 ns | 0.0167 ns | 0.0139 ns | 1.00 | 0.00 | - | - | - | - |
50-
| Hyperlinq_List_Reference | List_Reference | 100 | 1.807 ns | 0.0114 ns | 0.0107 ns | 0.33 | 0.00 | - | - | - | - |
49+
| Linq_List_Reference | List_Reference | 100 | 5.814 ns | 0.0171 ns | 0.0152 ns | 1.00 | 0.00 | - | - | - | - |
50+
| Hyperlinq_List_Reference | List_Reference | 100 | 1.561 ns | 0.0118 ns | 0.0111 ns | 0.27 | 0.00 | - | - | - | - |
5151
| | | | | | | | | | | | |
52-
| Linq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 65.851 ns | 1.3129 ns | 2.4007 ns | 1.00 | 0.00 | 0.0191 | - | - | 40 B |
53-
| Hyperlinq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 63.001 ns | 0.1889 ns | 0.1767 ns | 0.94 | 0.05 | 0.0191 | - | - | 40 B |
52+
| Linq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 62.757 ns | 0.1622 ns | 0.1438 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
53+
| Hyperlinq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 100 | 58.159 ns | 0.1437 ns | 0.1274 ns | 0.93 | 0.00 | 0.0153 | - | - | 32 B |

0 commit comments

Comments
 (0)