Skip to content

Make all jump opcodes relative #91276

Closed
Closed

Description

@iritkatriel
BPO 47120
Nosy @markshannon, @corona10, @brandtbucher, @iritkatriel
PRs
  • bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD #32115
  • gh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative #32215
  • bpo-47120: make JUMP_NO_INTERRUPT relative #32221
  • bpo-47120: define virtual opcodes in opcode.py. Better organization of jump opcodes. #32353
  • bpo-47120: make POP_JUMP_IF_NONE/NOT_NONE relative #32359
  • bpo-47120: make POP_JUMP_IF_TRUE/FALSE/NONE/NOT_NONE relative #32400
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/iritkatriel'
    closed_at = None
    created_at = <Date 2022-03-25.14:30:53.931>
    labels = ['interpreter-core', '3.11', 'performance']
    title = 'Make all jump opcodes relative'
    updated_at = <Date 2022-04-07.14:59:34.889>
    user = 'https://github.com/iritkatriel'

    bugs.python.org fields:

    activity = <Date 2022-04-07.14:59:34.889>
    actor = 'iritkatriel'
    assignee = 'iritkatriel'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2022-03-25.14:30:53.931>
    creator = 'iritkatriel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47120
    keywords = ['patch']
    message_count = 4.0
    messages = ['416003', '416431', '416466', '416772']
    nosy_count = 4.0
    nosy_names = ['Mark.Shannon', 'corona10', 'brandtbucher', 'iritkatriel']
    pr_nums = ['32115', '32215', '32221', '32353', '32359', '32400']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue47120'
    versions = ['Python 3.11']

    Linked PRs

    Activity

    1. iritkatriel commented on Mar 25, 2022

      @iritkatriel
      MemberAuthor

      For some of our jump opcodes target is absolute, so it can easily require EXTENDED_ARGS. Our analysis [1] shows that turning all absolute jumps into relative jumps will eliminate almost all EXTENDED_ARGS on jumps.

      This will require a _BACK version for each jump type, which negates the oparg.

      [1] faster-cpython/ideas#235 (reply in thread)

    2. self-assigned this
      on Mar 25, 2022
    3. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      performancePerformance or resource usage
      3.11only security fixes
      on Mar 25, 2022
    4. self-assigned this
      on Mar 25, 2022
    5. changed the title [-]Make all jumps relative[/-] [+]Make all jump opcodes relative[/+] on Mar 25, 2022
    6. changed the title [-]Make all jumps relative[/-] [+]Make all jump opcodes relative[/+] on Mar 25, 2022
    7. markshannon commented on Mar 31, 2022

      @markshannon
      Member

      New changeset a00518d by Irit Katriel in branch 'main':
      bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115)
      a00518d

    8. brandtbucher commented on Mar 31, 2022

      @brandtbucher
      Member

      Another benefit of this work is that we'll be able to remove first_instr from the eval loop.

    9. iritkatriel commented on Apr 5, 2022

      @iritkatriel
      MemberAuthor

      New changeset 0aa8d5c by Irit Katriel in branch 'main':
      bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221)
      0aa8d5c

    10. transferred this issue fromon Apr 10, 2022
    11. added a commit that references this issue on Apr 12, 2022
    12. added a commit that references this issue on Apr 15, 2022
    13. iritkatriel commented on Apr 15, 2022

      @iritkatriel
      MemberAuthor

      This is complete.

    14. added 3 commits that reference this issue on May 1, 2022
    15. added a commit that references this issue on Mar 31, 2023
    16. added a commit that references this issue on Apr 11, 2023
    17. added a commit that references this issue on Apr 11, 2023
    18. added a commit that references this issue on Apr 18, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.11only 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