暫無描述

dstromberg d1d2b6d35f No longer needed 9 年之前
Makefile 49885f92b6 performance-numbers.db no longer .PRECIOUS 10 年之前
README e886853fde Changed an errant comma to a period in the README 11 年之前
bloom_filter_mod.py 846c72dfb0 Improved a comment 9 年之前
count-bits 5fb9908837 Larger blocks. Give a percentage of set/clear 13 年之前
gen-performance-graph d31bb6e0ff Tabs to spaces 10 年之前
setup.py ca80ff76e3 Version bump 12 年之前
test-bloom-filter bceed76c2b Assorted pylint fixes 10 年之前

README


This bloom filter implementation:
1) Has a constructor that accepts a maximum comfortable number of members and maximum appropriate error (false positive) rate, and
derives the fiddly bits from that; most bloom filter modules ask the enduser to specify the fiddly bits themselves.
2) Has a nice test suite, including checks for error rate.
3) Is in pure Python that'll run on CPython 2.x, CPython 3.x, PyPy or Jython.
4) Has a pair of simple, fast hash functions that give a good error rate - they're better than many of the alternatives.
They're not Murmur or Jenkins, but the tests strongly suggest that they're working well.
5) Passes pylint and pep8.
6) Supports adding elements, testing for membership, and'ing sets and or'ing sets.

The code is derived from http://code.activestate.com/recipes/577686-bloom-filter/ and inherits that code's license (MIT).

For more about Bloom Filters:
http://en.wikipedia.org/wiki/Bloom_filter
http://spyced.blogspot.com/2009/01/all-you-ever-wanted-to-know-about.html