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

Using vectorized popcount #27

Merged
merged 2 commits into from
Jun 4, 2022
Merged

Using vectorized popcount #27

merged 2 commits into from
Jun 4, 2022

Conversation

kelindar
Copy link
Owner

@kelindar kelindar commented Jun 4, 2022

This PR adds a vectorized population count implementation, described in the paper https://arxiv.org/pdf/1611.07612.pdf by W. Mula, N. Kurz and D. Lemire. The code itself is borrowed from https://github.com/viant/vec/tree/main/bits with few alteration and a toolchain, I have it working for amd64 but haven't implemented for arm64 yet.

This results in a 50% improvement of performance for Count() operation and is especially useful for large bitmaps.

@kelindar kelindar merged commit 9c2019d into main Jun 4, 2022
@kelindar kelindar deleted the avx2count branch June 4, 2022 21:32
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