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

Optimize _for_probe() using const local variables. #196

merged 4 commits into from May 14, 2020


Copy link

@dbaarda dbaarda commented May 14, 2020

Use const local variables for the tmask and ktable to avoid dereferencing them from the hashtable with t->tmask and t->ktable repeatedly in the tight probing loop.

This doesn't make much difference when optimizing gcc with -O3, but it does with lower levels of optimizing, and is highly visible when profiling. So this will presumably help a fair bit on platforms that don't have highly optimizing compilers.

@dbaarda dbaarda merged commit 31a8fdf into librsync:master May 14, 2020
1 check passed
@dbaarda dbaarda deleted the opt/hashtable4 branch May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant