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

Scott David Daniels Scott.Daniels at Acm.Org
Sat Dec 20 18:41:39 CET 2008


Mike Coleman wrote:
> ... Regarding interning, I thought this only worked with strings. 
> Is there some way to intern integers?  I'm probably creating 300M
> integers more or less uniformly distributed across range(10000)?

held = list(range(10000))
...
     troublesome_dict[string] = held[number_to_hold]
...

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-Dev mailing list