[Python-3000] Is reference counting still needed?

Erno Kuusela erno at iki.fi
Thu Apr 20 11:39:08 CEST 2006


"Guido van Rossum" <guido at python.org> writes:

> Also,
> the argument about dirtying cache lines seem to be relevant to SMP
> architectures and probably doesn't apply much to Python as long as we
> have the GIL (which is not going away).

I guess the primary cost would probably be incurring the cache miss
and resulting stall, but it does also pollute the cache a bit to have
lots of 128 or 64-byte lines around for the single refcount field
contained therein...

But this is just armchair talk, some numbers would be nice. Maybe
one could measure it by making the refcounting macros real non-inline
functions and seeing how they show up in eg oprofile...

  -- erno




More information about the Python-3000 mailing list