How to use a 5 or 6 bit integer in Python?
Ben Finney
bignose-hates-spam at and-benfinney-does-too.id.au
Thu Dec 18 22:09:44 EST 2003
On Fri, 19 Dec 2003 11:42:49 +1100, Glen Wheeler wrote:
> My program uses many millions of integers, and Python is allocating
> way too much memory for these.
How have you measured this? As pointed out by others, Python doesn't
have duplicate occurrences of identical integers; it refers to the same
object multiple times.
Given this, I'm curious how you've measured the memory usage caused by
your program using millions of integers, and why you think reducing the
size of those integers will help significantly.
--
\ "I like to fill my bathtub up with water, then turn the shower |
`\ on and pretend I'm in a submarine that's been hit." -- Steven |
_o__) Wright |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list
mailing list