[Python-Dev] Atomic instructions for reference count increment/decrement

Arnar Birgisson arnarbi at gmail.com
Thu Dec 18 02:33:35 CET 2008


Hi all,

I'm new here, so bear with me. I tried googling this, but the closest
I came up with was a post from 2000.

>From the discussion about getting rid of the GIL lately, what I read
from it is that reference counting is the main obstacle. My question
is, why aren't hardware supported atomic increments and decrements
being used for the reference counters? As far as I'm told they are
available on most modern platforms (on x86 it is the LOCK instruction
prefix) and these incur little overhead.

I'd be very happy with pointers to previous discussion on the matter
or simple arguments why this would not apply to the Python reference
counting mechanism.

cheers,
Arnar


More information about the Python-Dev mailing list