How to use a 5 or 6 bit integer in Python?
Borcis
borcis at users.ch
Fri Dec 19 08:21:16 EST 2003
Glen Wheeler wrote:
> I'm using one dictionary to store all of the data, with tuples of
> ints as keys and a tuple as the data associated with each key. The
> data tuples contain a few ints and two more dictionaries.
> Can you think of a way to reduce the memory used here?
What's the length of the key tuples, and are there bounds on the
component ints ? Is the number of ints in the data tuples fixed ? What's
in the subdictionnaries, typically ? "millions of 5 bit integers" hints
of the possibility of a radical change of representation, but a radical
change of representation can only be devised if we know what's stable
- the task.
More information about the Python-list
mailing list