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
Reuse objects with refcount == 1 in specialized instructions #102300
Many VM instructions consume references to their operands and produce a reference to a result, often of the same type.
For some of those, we specialize for common types.
We can speed up the operations by reusing one of the operands if the refcount is one.
For example, in BINARY_OP_ADD_FLOAT if the refcount of the left operand is one, we can do the operation in place.
This is effectively free as we need to check the refcount of the operands in Py_DECREF() anyway.
We have attempted doing this in the past, but got bogged down trying to merge the operation and the following store.
Activity
GH-102300: Reuse objects with refcount == 1 in float specialized binaâĶ
pythonGH-102300: Reuse objects with refcount == 1 in float specializeâĶ
hugovk commentedon Mar 15, 2024
Closing, the linked PR has been merged.