Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Fix in-memory BloomFilter accuracy. initializing the bit-vector to all zeroes.  fixes #46

Also round-down the hash count (with rationale included in a comment).

The code was doubling the number of bits in the filter, but accuracy is
reliably within 2x of target (per the updated tests) even without this.
So I took that out.  BloomFilter will now use less space and the number
of bits should match what you'd get if you took all the Wikipedia
article's equations and calculated it yourself.

Removed num_slices, which I belatedly realized was for comparison
against pybloom.  I just fixed tests/comparisons/ to not
need a num_slices property on the bloom filter object.

Beefed up the accuracy test.  It now checks both malloc and mmap
BloomFilters for strings and integers.  It also has non-asserting tests
which print error rate as a function of elements inserted (purely for
humans looking at test results).

Made the simple tests prove all BloomFilter properties are preserved
with file copying, and loading from base64.
latest commit 18ad667445
@dbishop dbishop authored
Failed to load latest commit information.
comparisons Fix in-memory BloomFilter accuracy. Fixed tests. Fix in-memory BloomFilter accuracy.
Something went wrong with that request. Please try again.