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

Experiment With SIMD Probing #4

Open
ibraheemdev opened this issue Jul 7, 2024 · 2 comments
Open

Experiment With SIMD Probing #4

ibraheemdev opened this issue Jul 7, 2024 · 2 comments
Labels
performance Performance related improvements.

Comments

@ibraheemdev
Copy link
Owner

The hash-table uses a metadata table inspired by swisstable, so we should be able to benefit from SIMD probing. The difficulty is that atomic group loads must be aligned, causing us to lose some hash entropy. I ran some benchmarks previously and found a small regression from essentially copy-pasting the x86 SIMD implementation from hashbrown, so maybe there's not really much we can do here.

There's also questions about whether mixed-sized atomic accesses are sound on x86, but we should at least be able to benefit on other platforms.

@ibraheemdev ibraheemdev added the performance Performance related improvements. label Jul 7, 2024
@ibraheemdev
Copy link
Owner Author

Alternatively, if we decide not to use SIMD we might want to consider alternative probing strategy. The current quadratic by-group probing makes less sense if groups are not correlated with SIMD groups.

@ibraheemdev
Copy link
Owner Author

ibraheemdev commented Jul 9, 2024

9b8add8 switches to pure quadratic probing. Read performance seems to be consistently lower, especially on large tables. However, I'm noticing some unexpected performance fluctuations when adjusting the load factor, so I'd be interested in more robust benchmarks and an analysis of probe lengths. We're in a somewhat unique situation of having a metadata table but not using SIMD (even at the machine word level).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance related improvements.
Projects
None yet
Development

No branches or pull requests

1 participant