[Python-Dev] iterzip()

Tim Peters tim.one@comcast.net
Mon, 29 Apr 2002 19:42:22 -0400


[Neil Schemenauer]
> ...
> I just tried measuring the time spent in the GC while loading some nasty
> web pages in our system (stuff that looks at thousands of objects).  I
> used the Pentium cycle counter since clock(2) seems to have very low
> resolution.  Setting threshold0 to 7500 makes the GC take up twice the
> amount of time as with the default settings (700).  That surprised me.
> I thought it wouldn't make much difference.  Maybe I screwed up. :-)

Did you try reducing theshold0 too?  Maybe GC time tends toward zero as
threshold0 does <wink>.

I wouldn't discount cache effects here.  7500 objects adds up to lot of
bytes, and gc traversal touches stuff all over them.  This is one good
reason for why a gen0 traversal of the 7500 most-recently allocated
still-live objects may take significantly longer than 10 gen0 traversals of
the 750 suchlike.