This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
robin_hood.h: Change hash val shifts for info
and idx
generation
#148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of generating the
info
hash bits with a mask + shift, we canjust use an unsigned shift from the end as that will bring in zeros.
With that change the
idx
hash bits can start from the begining so weno longer need to shift out the
info
hash bits.Saves 2x instructions. Only ALU but this function is in the critical
path.
There does not appear to be any issue with false hits changing the tag
bits used.
False Tag Match Rates:
Insert Seq Ints:
2^10 : 2.539, 2.832
2^12 : 3.076, 3.003
2^14 : 2.960, 3.497
2^16 : 4.048, 4.306
2^18 : 4.543, 4.732
2^20 : 5.182, 5.553
2^22 : 5.579, 5.557
2^24 : 6.237, 6.017
2^26 : 6.599, 6.432
Insert Rand Ints (seed = 0):
2^10 : 2.637, 4.199
2^12 : 2.979, 3.613
2^14 : 3.662, 3.955
2^16 : 4.309, 4.849
2^18 : 4.626, 4.564
2^20 : 4.849, 5.044
2^22 : 6.050, 5.279
2^24 : 5.664, 6.350
2^26 : 6.640, 6.771
Insert Strings:
All Words(0) : 4.974, 5.231
10k Words(1) : 3.550, 4.000
URLS(2) : 5.548, 5.683
URLS(2) w/ "http://" : 5.466, 5.831
URLS(2) w/ "https://" : 5.569, 5.761