[Python-Dev] Lazily GC tracking tuples

Tim Peters tim.one@comcast.net
Fri, 24 May 2002 20:15:03 -0400


[Kevin Jacobs]
> Well, I've found one case where the garbage collector _does_ cause
> serious performance problems, and coincidentally enough it is due to
> the creation of zillions of cycle-less tuples.  Our current solution has
> been to disable GC in some parts of our code, and then manually trigger
> collection at the correct points.  When I can find some free time, I will
> definitly test drive any available tuple untracking patches to see if
> they make any substantial difference in our code.

Well, I'm told it's a 3-day weekend <wink>, and Neil has a short patch you
can try:

    http://www.python.org/sf/558745

If you can, please do.  I view this as a diasaster-insurance change, not as
a generally applicable speedup (it's almost certainly not, and especially
not when using a distinct pass to weed out tuples -- I'd combine it with the
copy-refcounts pass), so this lives or dies on whether it helps people
suffering pathologies in real life.  That's you.

yes-you-really-are-the-center-of-the-universe-ly y'rs  - tim