Most efficient way of storing 1024*1024 bits

Alex Martelli aleax at mail.comcast.net
Thu Nov 3 00:03:13 EST 2005


Brandon K <prince_amir86 at yahoo.com> wrote [inverting his topposting!]:

> > Six megabytes is pretty much nothing on a modern computer.

> BTW, it'd be 6 megabits or 750kb ;)

...but Mike was proposing using one digit per bit, hence, 6 megabytes.
That makes it easy to search for bitpatterns with re or string.find; if
the bits were packed 8 to a byte, such searches would be very hard.


Alex



More information about the Python-list mailing list