How to use a 5 or 6 bit integer in Python?
Rainer Deyke
rainerd at eldwood.com
Fri Dec 19 12:54:03 EST 2003
Glen Wheeler wrote:
> I'll be sure to do this. Will it increase the hash speed for the
> big dictionary significantly? Will lookup times or memory storage
> requirements decrease?
Using strings instead of tuples of integers should decrease memory usage. A
character in a string is stored as a single byte, whereas each tuple element
needs four bytes.
--
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com
More information about the Python-list
mailing list