mavam / libbf

:dart: Bloom filters for C++11

Home Page:http://mavam.github.io/libbf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

thomasmueller opened this issue · comments

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.)

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.)

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.

[..] 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. 😕