Closed
Description
Feature or enhancement
Proposal:
PEP 703 proposes deferred reference counting to reduce contention between threads on shared objects' reference count fields.
This issue is not in conflict with Faster CPython's scheme of fully removing reference counts in the eval loop. In fact, some of the work runs parallel to it and will actually help it.
There are 3 wins I can observe right now:
- deferring
LOAD_GLOBAL
- deferring
LOAD_ATTR
- deferring frames' strong references on the code object and function (this is the hardest of the three)
I shall proceed in this order.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-121459: Deferred LOAD_GLOBAL #123128
- gh-121459: Add missing return to _PyDict_LoadGlobalStackRef #124085
- gh-121459: Deferred LOAD_ATTR (methods) #124101
- GH-121459: Streamline PyObject* to PyStackRef conversions by disallowing NULL pointers. #124894
- gh-121459: Fix a couple of uses of
PyStackRef_FromPyObjectSteal
#125711