News for hackers. Stuff that matters.
Re:How to write a Bloom filter in C++ by schmatz on Monday April 11, 2016 @09:26PM (#11476570)
Great suggestion; I wasn't sure the idiomatic way to template this, thanks for letting me know!
Re:How to write a Bloom filter in C++ by nate_martin on Monday April 11, 2016 @09:31PM (#11476584)
Probably something like this:

template< class Key, class Hash = std::hash<Key> > class BloomFilter;

Re:How to write a Bloom filter in C++ by bradleyjg on Monday April 11, 2016 @09:58PM (#11476673)
I don't use c++ so I'm not sure how std:hash works or gets implemented, but the way that guava (Google's java library) does it is by passing in a key and a funnel object. The funnel object is essentially responsible for decomposing the object into a byte stream. The advantage of doing it this way rather than making the caller specify his own hash is that you can use murmurhash3 which you thought had the best properties for the bloom filter.
Re:How to write a Bloom filter in C++ by schmatz on Monday April 11, 2016 @09:39PM (#11476605)
I updated the blog post with your suggestion; CDN should be updated soon :)