C# benchmarks for performance optimized code. I'd rather it be fast than pretty.
- C# 100%
| Benchmarks | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
Benchmarks
C# benchmarks for performance optimized code. I'd rather it be fast than pretty.
Benchmarks
Note: These are run with [LongRunJob]
ReadArray
Fastest way to read through an array of ints.
| Method | Count | Mean | Error | Ratio | RatioSD | Rank |
|---|---|---|---|---|---|---|
| WTF | 1000000 | 294.3 us | 0.20 us | 0.98 | 0.01 | 1 |
| Span | 1000000 | 295.6 us | 0.25 us | 0.98 | 0.01 | 1 |
| Fast | 1000000 | 295.7 us | 0.25 us | 0.98 | 0.01 | 1 |
| Normal | 1000000 | 300.3 us | 0.66 us | 1.00 | 0.02 | 1 |
FillArray
Fastest way to fill an array.
| Method | Count | Mean | Error | Ratio | RatioSD | Rank |
|---|---|---|---|---|---|---|
| Span | 1000000 | 297.7 us | 0.31 us | 0.98 | 0.01 | 1 |
| Normal | 1000000 | 303.9 us | 0.45 us | 1.00 | 0.01 | 1 |
| WTF | 1000000 | 419.5 us | 0.74 us | 1.38 | 0.02 | 2 |
| Fast | 1000000 | 477.1 us | 0.26 us | 1.57 | 0.01 | 3 |