[Python-ideas] Remove GIL with CAS instructions?

Antoine Pitrou solipsis at pitrou.net
Wed Oct 21 01:50:29 CEST 2009


Sturla Molden <sturla at ...> writes:
> 
> Yes, one could add a nonsence CAS to existing incref/decref, and measure 
> overhead.

That would be the first thing to do IMO.
If it doesn't seem to decrease performance a lot, you could continue by adding
locking to dict objects, and measure again.
Then add lists and sets (although I doubt sets and even lists are
performance-critical for general interpreter operation).
If after that you have less than a 10% slowdown (personal opinion only, other
people's mileage may vary), it's probably worth going on and trying to do the
whole GIL removal (which doesn't mean it would necessarily be accepted, by the
way, but at least would avoid it being automatically rejected ;-)).

Regards

Antoine.





More information about the Python-ideas mailing list