C# benchmarks for performance optimized code. I'd rather it be fast than pretty.
Find a file
2026-05-09 12:59:45 +02:00
Benchmarks Added two tests 2026-05-09 12:56:05 +02:00
.gitignore init 2026-05-07 19:51:11 +02:00
LICENSE Initial commit 2026-05-07 17:42:58 +00:00
README.md Forgot this 2026-05-09 12:59:45 +02:00

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