[Python-Dev] iterzip()

Guido van Rossum guido@python.org
Mon, 29 Apr 2002 16:10:36 -0400


> It acts about the same on Linux.
> 
> I don't see why it's a mystery.  justtups() only uses one tuple at a
> time; it gets re-used from the free list every time.  storetups() has
> to (py)malloc a new tuple every stinkin' time.
> 
> Note that there's a net excess of allocations in the storetup() case,
> so we invoke the garbage collector every n/700 times through the
> loop.  I've noted before that it doesn't make much sense to invoke GC
> unless there is at least one deallocation; you can't reclaim anything
> if there are no DECREFs.

But note the difference between 2.2 and 2.3 that I measured
(repeatedly -- I don't know why Holger doesn't see this).  Did the GC
algorithm change between the two?  *Something* must've changed.

--Guido van Rossum (home page: http://www.python.org/~guido/)