Wanted: mutable bitmap

Tom Anderson twic at urchin.earth.li
Sat Sep 17 16:55:03 EDT 2005


Hello!

One thing that would be rather useful in various bits of programming i've 
done would be a mutable bitmap type. Basically, this would behave like a 
set, where the items were constrained to be positive integers (perhaps 
less than some limit set at construction time). The advantage over a set 
would be performance (both time- and space-wise), pure and simple - this 
object would be an optimisation tool. However, the performance it delivers 
is pretty much essential for implementing things like Bloom filters, the 
sieve of Eratosthenes, and other computer science staples.

Am i right in thinking there's no such thing in the standard library? Is 
there an implementation out there somewhere else? Is there a hack for 
doing it with the stuff that is in the standard library?

tom

-- 
Ensure a star-man is never constructed!



More information about the Python-list mailing list