[Python-Dev] iterzip()

Tim Peters tim.one@comcast.net
Wed, 01 May 2002 11:44:10 -0400

> Hmm!  I bet we could go a long away leaving gc out of this entirely:
> ...

> But this still takes time, and most tuples never make it into GC, so
> it's wasted time, isn't it?

Absolutely.  I'm trying to understand the true causes here by fiddling
various things.  It turned out that "useless" tracing of tuples accounted
for more than half the gc burden in this test, but not much more than half
(the rest was due to "useless" repeated tracing of the list containing all
the tuples).

> I'd put such code in tuplevisit (assuming it's safe to call GC_UnTrack
> there).

I'm pretty sure that would lead to instant segfaults, but the gc loops
calling tp_traverse could be fiddled to save a local pointer to "the next
guy" before invoking tp_traverse.  I'm not sure that's the best place to put