[Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

Mike Coleman tutufan at gmail.com
Tue Dec 23 18:54:11 CET 2008


On Sat, Dec 20, 2008 at 6:22 PM, Mike Coleman <tutufan at gmail.com> wrote:
> Re "held" and "intern_it":  Haha!  That's evil and extremely evil,
> respectively.  :-)

P.S.  I tried the "held" idea out (interning integers in a list), and
unfortunately it didn't make that much difference.  In the example I
tried, there were 104465178 instances of integers from range(33467).
I guess if ints are 12 bytes (per Beazley's book, but not sure if that
still holds), then that would correspond to a 1GB reduction.  Judging
by 'top', it might have been 2 or 3GB instead, from a total of 45G.

Mike


More information about the Python-Dev mailing list