[Python-Dev] Lazily GC tracking tuples

Tim Peters tim.one@comcast.net
Tue, 28 May 2002 21:52:39 -0400


[Kevin Jacobs, on Neil's tuple-untracking patch]
> It doesn't seem to make much difference in our app.  There seems
> to be some speedup, but nothing dramatic.  Turning GC on and off at the
> right times is still slightly faster.

I'm confused.  You earlier said:

    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.

Now I'm hearing that turning GC on and off is only "slightly faster", and
that the speedup is so small you're not even sure there is one ("turning GC
on and off" is "slightly faster" than a trial where there "seems to be some
speedup").  This is not "serious performance problems" except to nanosecond
counters like me <wink>.

> The good news is that another (unrelated) part of our code just became
> about 20-40% faster with this patch, though I need to do some fairly
> major surgery to isolate why this is so.

Keep us informed!  I suspect you're suffering from an app that's more than
20 lines long; I try to stay away from those.

most-days-it's-hard-enough-out-thinking-one-line-ly y'rs  - tim