Skip to content

Commit 6199b1a

Browse files
authored
Refactor handling of IReadOnlyList (#351)
* Refactor handling of IReadOnlyList * Fixes
1 parent f4146ed commit 6199b1a

91 files changed

Lines changed: 1056 additions & 861 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/SingleBenchmarks.md

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[SingleBenchmarks.cs](../NetFabric.Hyperlinq.Benchmarks/Benchmarks/SingleBenchmarks.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,44 +14,15 @@
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+
.NET 6.0 : .NET 6.0.0 (6.0.21.15406), X64 RyuJIT
2222

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

2525
```
26-
| Method | Categories | Count | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
27-
|------------------------------------ |-------------------------- |------ |----------:|----------:|----------:|------:|--------:|-------:|------:|------:|----------:|
28-
| Linq_Array | Array | 1 | 11.808 ns | 0.2634 ns | 0.5011 ns | 1.00 | 0.00 | - | - | - | - |
29-
| Hyperlinq_Array | Array | 1 | 13.928 ns | 0.0230 ns | 0.0192 ns | 1.20 | 0.05 | - | - | - | - |
30-
| | | | | | | | | | | | |
31-
| Linq_Enumerable_Value | Enumerable_Value | 1 | 23.083 ns | 0.1199 ns | 0.1062 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
32-
| Hyperlinq_Enumerable_Value | Enumerable_Value | 1 | 16.547 ns | 0.0383 ns | 0.0359 ns | 0.72 | 0.00 | - | - | - | - |
33-
| | | | | | | | | | | | |
34-
| Linq_Collection_Value | Collection_Value | 1 | 23.476 ns | 0.4181 ns | 0.6986 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
35-
| Hyperlinq_Collection_Value | Collection_Value | 1 | 18.673 ns | 0.0344 ns | 0.0322 ns | 0.79 | 0.03 | - | - | - | - |
36-
| | | | | | | | | | | | |
37-
| Linq_List_Value | List_Value | 1 | 7.425 ns | 0.0417 ns | 0.0348 ns | 1.00 | 0.00 | - | - | - | - |
38-
| Hyperlinq_List_Value | List_Value | 1 | 22.084 ns | 0.0572 ns | 0.0507 ns | 2.97 | 0.02 | - | - | - | - |
39-
| | | | | | | | | | | | |
40-
| Linq_AsyncEnumerable_Value | AsyncEnumerable_Value | 1 | 89.296 ns | 0.1602 ns | 0.1420 ns | 1.00 | 0.00 | 0.0191 | - | - | 40 B |
41-
| Hyperlinq_AsyncEnumerable_Value | AsyncEnumerable_Value | 1 | NA | NA | NA | ? | ? | - | - | - | - |
42-
| | | | | | | | | | | | |
43-
| Linq_Enumerable_Reference | Enumerable_Reference | 1 | 17.964 ns | 0.0869 ns | 0.0813 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
44-
| Hyperlinq_Enumerable_Reference | Enumerable_Reference | 1 | 15.953 ns | 0.0711 ns | 0.0630 ns | 0.89 | 0.01 | 0.0153 | - | - | 32 B |
45-
| | | | | | | | | | | | |
46-
| Linq_Collection_Reference | Collection_Reference | 1 | 18.071 ns | 0.1005 ns | 0.0891 ns | 1.00 | 0.00 | 0.0153 | - | - | 32 B |
47-
| Hyperlinq_Collection_Reference | Collection_Reference | 1 | 16.254 ns | 0.0875 ns | 0.1864 ns | 0.91 | 0.01 | 0.0153 | - | - | 32 B |
48-
| | | | | | | | | | | | |
49-
| Linq_List_Reference | List_Reference | 1 | 7.401 ns | 0.1724 ns | 0.1693 ns | 1.00 | 0.00 | - | - | - | - |
50-
| Hyperlinq_List_Reference | List_Reference | 1 | 22.010 ns | 0.0530 ns | 0.0496 ns | 2.97 | 0.07 | - | - | - | - |
51-
| | | | | | | | | | | | |
52-
| Linq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 1 | 84.754 ns | 0.2935 ns | 0.2602 ns | 1.00 | 0.00 | 0.0191 | - | - | 40 B |
53-
| Hyperlinq_AsyncEnumerable_Reference | AsyncEnumerable_Reference | 1 | NA | NA | NA | ? | ? | - | - | - | - |
54-
55-
Benchmarks with issues:
56-
SingleBenchmarks.Hyperlinq_AsyncEnumerable_Value: .NET Core 5.0(Runtime=.NET Core 5.0) [Count=1]
57-
SingleBenchmarks.Hyperlinq_AsyncEnumerable_Reference: .NET Core 5.0(Runtime=.NET Core 5.0) [Count=1]
26+
| Method | Count | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
27+
|-------------------------------- |------ |---------:|---------:|---------:|------:|------:|------:|----------:|
28+
| Hyperlinq_AsyncEnumerable_Value | 1 | 84.27 ns | 0.499 ns | 0.443 ns | - | - | - | - |

NetFabric.Hyperlinq.Benchmarks/Benchmarks/AllBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
3-
using System;
43
using System.Linq;
54
using System.Threading.Tasks;
65

NetFabric.Hyperlinq.Benchmarks/Benchmarks/AnyBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
3-
using System;
43
using System.Linq;
54
using System.Threading.Tasks;
65

NetFabric.Hyperlinq.Benchmarks/Benchmarks/AnyPredicateBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
3-
using System;
43
using System.Linq;
54
using System.Threading.Tasks;
65

NetFabric.Hyperlinq.Benchmarks/Benchmarks/ContainsBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
3-
using System;
43
using System.Linq;
54
using System.Threading.Tasks;
65

NetFabric.Hyperlinq.Benchmarks/Benchmarks/ContainsComparerBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
3-
using System;
43
using System.Collections.Generic;
54
using System.Linq;
65
using System.Threading.Tasks;

NetFabric.Hyperlinq.Benchmarks/Benchmarks/CountBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
33
using StructLinq;
4-
using System;
54
using System.Linq;
65
using System.Threading.Tasks;
76

NetFabric.Hyperlinq.Benchmarks/Benchmarks/ElementAtBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
3-
using System;
43
using System.Linq;
54
using System.Threading.Tasks;
65

NetFabric.Hyperlinq.Benchmarks/Benchmarks/EmptyBenchmarks.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
41
using System.Linq;
52
using System.Threading.Tasks;
63
using BenchmarkDotNet.Attributes;
74
using BenchmarkDotNet.Configs;
8-
using StructLinq;
95

106
namespace NetFabric.Hyperlinq.Benchmarks
117
{

NetFabric.Hyperlinq.Benchmarks/Benchmarks/FirstBenchmarks.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Configs;
3-
using System;
43
using System.Linq;
54
using System.Threading.Tasks;
65

0 commit comments

Comments
 (0)