Skip to content

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Oct 9, 2024

This PR adds a LOAD_FAST_TEMP instruction for loading locals to the evaluation stack that are used as short-lived values within an expression. Distinguishing these LOAD_FAST instructions will allow us to avoid expensive reference counting operations in these cases.

This is marked as draft, as it has no value until the default build supports reference counts in tags.

The stats show that 3/4 of all LOAD_FAST (including the LOAD_FASTs in LOAD_FAST_LOAD_FAST) are converted to LOAD_FAST_TEMP.

Before merging, a few tests need fixing and the choice of superinstructions needs updating.

@markshannon markshannon changed the title Mark load fast deferred for guaranteed consumed refs GH-120024: Change LOAD_FAST instructions to LOAD_FAST_TEMP when it is guaranteed the reference is consumed immediately. Oct 9, 2024
@markshannon
Copy link
Member Author

Superseded by #130708

@markshannon markshannon closed this Mar 3, 2025
@markshannon markshannon deleted the mark-load-fast-deferred-for-guaranteed-consumed-refs branch March 3, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant