dotnet-benchmarks
dotnet-benchmarks copied to clipboard
Cache locality benchmark
This is a benchmark to test how much we lose if we have no idea how local caches work
Method | IsMultithreadingOn | Mean | Error | StdDev | Median |
---|---|---|---|---|---|
'Threads read one by one confusing the cacheline' | False | 143.17 ms | 2.850 ms | 4.839 ms | 142.78 ms |
'Threads read far from each other' | False | 54.35 ms | 0.964 ms | 0.805 ms | 54.00 ms |
'Threads write one by one confusing the cacheline' | False | 189.52 ms | 3.725 ms | 4.711 ms | 189.78 ms |
'Threads write far from each other' | False | 48.54 ms | 0.811 ms | 0.719 ms | 48.19 ms |
'Threads read one by one confusing the cacheline' | True | 47.70 ms | 1.634 ms | 4.715 ms | 48.64 ms |
'Threads read far from each other' | True | 20.06 ms | 0.595 ms | 1.726 ms | 20.54 ms |
'Threads write one by one confusing the cacheline' | True | 67.12 ms | 2.790 ms | 8.140 ms | 66.29 ms |
'Threads write far from each other' | True | 22.11 ms | 0.433 ms | 0.759 ms | 22.24 ms |
Conclusion: we lose a lot