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

Possible performance improvement by replacing % (modulo) with multiply + shift #33

Open
thomasmueller opened this issue Sep 13, 2018 · 3 comments

Comments

@thomasmueller
Copy link

This is described in http://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/

(I'm looking for a fast Bloom filter implementation, and found your implementation uses modulo which is a bit slow.)

@mavam
Copy link
Owner

mavam commented Sep 14, 2018

Thanks for taking a look at the performance.

Do you have some example/profiling data showing that this is indeed on the critical path?

(Unfortunately I don't have the cycles to drive such experiments forward at the moment, but I'm happy to review and integrate community contributions.)

@thomasmueller
Copy link
Author

Feel free to close the issue. I'm working on my own Bloom filter implementation, and for my case it does make a big difference. But if you don't have any benchmarks, maybe you don't care so much about performance... that's fine! It was just FYI.

@mavam
Copy link
Owner

mavam commented Sep 14, 2018

[..] and for my case it does make a big difference.

Good to know, I appreciate that you shared this information.

But if you don't have any benchmarks, maybe you don't care so much about performance... that's fine!

I do care about performance actually, I just don't have cycles at the moment to advance this repository into a state where I would like to see it. 😕

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

No branches or pull requests

2 participants