You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimize reference counting overhead of LOAD_FAST variants #130704
LOAD_FAST and its super instruction form are the most frequently executed bytecode instructions in most Python programs (they represent ~20% of dynamic instruction frequency on the benchmark suite). While they are very cheap (they're just an incref and a push to the stack), they are not free. If we can prove that the reference in the frame outlives the reference that is loaded on the stack we can use a cheaper variant of LOAD_FAST that loads an appropriately tagged borrowed reference onto the operand stack, thereby avoiding the incref/decref.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Activity
gh-130704: Strength reduce `LOAD_FAST{_LOAD_FAST}` (#130708)
pythongh-133164: Add `PyUnstable_Object_IsUniqueTemporary` C API
gh-133164: Add `PyUnstable_Object_IsUniqueReferencedTemporary` C API (g…
pythongh-133164: Add `PyUnstable_Object_IsUniqueReferencedTemporary` …