Skip to content

Use explicit constants in stack effects when known. #116468

Description

@markshannon

We use oparg for stack effects even when oparg is a constant for a particular specialization.
For example UNPACK_SEQUENCE_TUPLE is defined as:

inst(UNPACK_SEQUENCE_TWO_TUPLE, (unused/1, seq -- values[oparg]))

resulting in slightly inefficient code. It should be defined as:

inst(UNPACK_SEQUENCE_TWO_TUPLE, (unused/1, seq -- val1, val0))

Linked PRs

Activity

  1. added
    performancePerformance or resource usage
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    3.13only security fixes
    on Mar 7, 2024
  2. self-assigned this
    on Mar 7, 2024
  3. added a commit that references this issue on Mar 11, 2024
  4. hugovk commented on Mar 15, 2024

    @hugovk
    Member

    Triage: can this issue be closed?

  5. added a commit that references this issue on Mar 25, 2024
  6. added a commit that references this issue on Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.13only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions