zip() function troubles
Paul Rubin
http
Thu Jul 26 21:33:03 EDT 2007
Istvan Albert <istvan.albert at gmail.com> writes:
> I tested this on a linux server system with 4Gb of RAM
> a = [ 0 ] * 10**7
> takes miliseconds, but say the
> b = zip(a,a)
> will take a very long time to finish:
Do a top or vmstat while that is happening and see if you are
swapping. You are allocating 10 million ints and 10 million tuple
nodes, = 20 million objects. Although, even at 100 bytes per object
that would be 1GB which would fit in your machine easily. Is it
a 64 bit cpu?
More information about the Python-list
mailing list