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

Consider storing 6 bits of key hash codes in tagged pointers #2

Closed
puzpuzpuz opened this issue Aug 11, 2021 · 0 comments · Fixed by #31
Closed

Consider storing 6 bits of key hash codes in tagged pointers #2

puzpuzpuz opened this issue Aug 11, 2021 · 0 comments · Fixed by #31
Labels
enhancement New feature or request experiment

Comments

@puzpuzpuz
Copy link
Owner

puzpuzpuz commented Aug 11, 2021

Since 64-bit pointers in Go are 8-byte aligned, we could use free 2x3 bits to store a (MSB?) part of the key hash code as tagged pointers in key and value pointers. This should improve search performance since this way we won't need to calculate equality of all scanned keys, but only a part of them.

@puzpuzpuz puzpuzpuz added the enhancement New feature or request label Aug 11, 2021
@puzpuzpuz puzpuzpuz changed the title Consider storing 3 bits of key hash codes in tagged pointers Consider storing 6 bits of key hash codes in tagged pointers Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experiment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant