Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache locality benchmark #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

WhiteBlackGoose
Copy link
Member

@WhiteBlackGoose WhiteBlackGoose commented Jul 16, 2021

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

@WhiteBlackGoose WhiteBlackGoose marked this pull request as ready for review July 16, 2021 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant