zip() function troubles
Paul Rubin
http
Fri Jul 27 02:35:44 EDT 2007
Peter Otten <__peter__ at web.de> writes:
> When you are allocating a lot of objects without releasing them the garbage
> collector kicks in to look for cycles. Try switching it off:
I think that is the answer. The zip took almost 2 minutes without
turning gc off, but takes 1.25 seconds with gc off. It turned a
linear-time algorithm into a quadratic one. I think something is
broken about a design where that can happen. Maybe Pypy will have
a generational GC someday.
More information about the Python-list
mailing list