Bloom Filter in 22 lines of Python (updated)

Dan Stromberg drsalists at gmail.com
Fri Jun 3 16:37:52 EDT 2011


FWIW, I took what I believe to have been the 2nd generation of this code,
and put some of my own spin on it - mostly making it pass pylint, changing
the __init__ arguments to be a little more intuitive (to me), and expanding
the tests a bit.

It's at http://stromberg.dnsalias.org/svn/bloom-filter/trunk/

I'm using it in backshift to detect hardlinks in potentially-huge
filesystems - so far, it seems to be working great.

On Fri, Jun 3, 2011 at 1:17 PM, Raymond Hettinger <python at rcn.com> wrote:

> Thanks for all the feedback on the earlier post.
>
> I've updated the recipe to use a cleaner API, simpler code,
> more easily subclassable, and with optional optimizations
> for better cache utilization and speed:
>
>  http://code.activestate.com/recipes/577684-bloom-filter/
>
>
> Raymond
>
> ----------------------
> follow my python tips and recipes on twitter: @raymondh
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110603/a476dc80/attachment-0001.html>


More information about the Python-list mailing list