↓ Skip to main content

“Replacing Py_INCREF and Py_DECREF with atomic variants would result in a 60% average slowdown on the pyperformance benchmark suite.”

Jonathan Corbetlwn.net ↗

That 60% is why the GIL has survived every attempt to kill it. Sam Gross got around it with biased reference counts and came out 10% faster than CPython, with 18-20x speedups on 20 threads. Guido’s first reaction was that Python could take the speedups and skip the threading. One engineer did what the core team has called impractical for a decade.