Skip to content

Commit 400e1b3

Browse files
committed
[ForEach] Add benchmark result in cs files.
1 parent 383d20c commit 400e1b3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/StructLinq.Benchmark/ForEach.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44

55
namespace StructLinq.Benchmark
66
{
7+
8+
//BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
9+
//Intel Core i7-8750H CPU 2.20GHz(Coffee Lake), 1 CPU, 12 logical and 6 physical cores
10+
//.NET Core SDK = 3.1.101
11+
12+
//[Host] : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), X64 RyuJIT
13+
//DefaultJob : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), X64 RyuJIT
14+
15+
16+
//```
17+
//| Method | Mean | Error | StdDev | Ratio | Gen 0 | Gen 1 | Gen 2 | Allocated |
18+
//|---------------------------- |---------:|--------:|--------:|------:|------:|------:|------:|----------:|
19+
//| ClrForEach | 385.1 us | 1.23 us | 1.15 us | 1.00 | - | - | - | 41 B |
20+
//| WithAction | 237.9 us | 0.85 us | 0.79 us | 0.62 | - | - | - | 25 B |
21+
//| WithStruct | 142.2 us | 0.29 us | 0.27 us | 0.37 | - | - | - | 24 B |
22+
//| ZeroAllocWithStruct | 139.9 us | 0.41 us | 0.38 us | 0.36 | - | - | - | - |
23+
//| ToTypedEnumerableWithStruct | 384.6 us | 0.93 us | 0.82 us | 1.00 | - | - | - | 66 B |
24+
725
[MemoryDiagnoser]
826
public class ForEach
927
{

0 commit comments

Comments
 (0)