4 ms·
Benchmarking Bloom Filters and Hash Functions in Go
- aappleby 13y agoLooks like your Murmur implementation may be broken? -Austin (Murmur author)
- zhenjl 13y agoAustin, yeah pretty sure it's broken, unfortunately. I used an implementation another person ported but results seem to come out weird. I need to figure out why when I get a moment, or do a port of my own.
- bradfitz 13y agoWhy are you allocating in your standard implementation's Check function? That can't be good for performance.
- zhenjl 13y agoSorry for the delay in responding there. Hadn't check this for a couple of days. You are correct. In fact, I am allocating in both standard and partitioned Check() implementations, in the bits() func. I can pre-allocate during New() and keep using the same slice without re-make. Thanks for the suggestion! I will update and re-run. I also need to go back and figure out the murmur3 implementation is not working.
- zhenjl 13y agoAuthor here. (same comment posted to reddit) @bradfitz thanks for the comments and suggestion. I updated the code based on your suggestion (not allocate for every add/check) and the performance improved by 25+%!! Appreciate it! I updated the blog and here's the gist that contains the latest results: https://gist.github.com/zhenjl/6515577 https://gist.github.com/zhenjl/6515577