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
We should implement unique reference tracking in Tier 2 to facilitate optimizations that reduce reference counting overhead. For example, when a tuple is known to be uniquely referenced, we can "steal" its element references during unpacking without performing any reference counting operations.
Feature or enhancement
Proposal:
Motivation
We should implement
unique reference trackingin Tier 2 to facilitate optimizations that reduce reference counting overhead. For example, when a tuple is known to be uniquely referenced, we can "steal" its element references during unpacking without performing any reference counting operations.For reference: discussion in #142952
Technical Approach
REF_IS_UNIQUEbit (bit 1) to theJitOptRefunion inpycore_optimizer.h(code reference).PyJitRef_MakeUnique()andPyJitRef_IsUnique()helper functions.PyJitRef_StripReferenceInfoandJIT_BITS_TO_PTR_MASKEDto support this unique reference bit.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs