Ref-Count Evolution: Paving Way for Free-Threading

The ongoing evolution of CPython's reference counting, through innovations like borrowing and immortal objects, significantly reduces `Py_INCREF`/`Py_DECREF` overhead and contention. These advancements, coupled with techniques like deferred reference counting and stack references, are crucial building blocks towards achieving a more efficient, multi-core, and free-threaded Python runtime.

Sources

Open the full topic