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

better for cache #564

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KaurkerDevourer
Copy link

2-d arrays, with sizes like A[n][2^x] are much slower, than the same arrays, but with B[n][2^x + 1] sizes, due to cache misses.

I'm not sure, how to benchmark commit the right way, but on my machine I got:
My branch
5: 13231 nodes 287630 nps
10: 88205 nodes 541134 nps
13: 259811 nodes 604211 nps
15: 519805 nodes 642527 nps
20: 2815782 nodes 653616 nps


Main branch
5: 13231 nodes 281510 nps
10: 88205 nodes 569064 nps
13: 259811 nodes 618597 nps
15: 519805 nodes 665563 nps
20: 2815782 nodes 670583 nps

Left number is depth of benchmark.

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