This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make all jump opcodes relative
Type: performance Stage: patch review
Components: Interpreter Core Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: iritkatriel Nosy List: Mark.Shannon, brandtbucher, corona10, iritkatriel
Priority: normal Keywords: patch

Created on 2022-03-25 14:30 by iritkatriel, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 32115 merged iritkatriel, 2022-03-25 15:05
PR 32215 open iritkatriel, 2022-03-31 14:31
PR 32221 merged iritkatriel, 2022-03-31 21:41
PR 32353 closed iritkatriel, 2022-04-06 08:31
PR 32359 closed iritkatriel, 2022-04-06 11:29
PR 32400 open iritkatriel, 2022-04-07 14:59
Messages (4)
msg416003 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-03-25 14:30
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] https://github.com/faster-cpython/ideas/discussions/235#discussioncomment-2417022
msg416431 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2022-03-31 13:14
New changeset a00518d9ad9a8f408a9699191019d75dd8406c32 by Irit Katriel in branch 'main':
bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115)
https://github.com/python/cpython/commit/a00518d9ad9a8f408a9699191019d75dd8406c32
msg416466 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2022-03-31 23:12
Another benefit of this work is that we'll be able to remove `first_instr` from the eval loop.
msg416772 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-04-05 11:49
New changeset 0aa8d5cbd89cf3b61d7e8626f3a7b9c4881dfd70 by Irit Katriel in branch 'main':
bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221)
https://github.com/python/cpython/commit/0aa8d5cbd89cf3b61d7e8626f3a7b9c4881dfd70
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91276
2022-04-07 14:59:34iritkatrielsetpull_requests: + pull_request30427
2022-04-06 11:29:27iritkatrielsetpull_requests: + pull_request30408
2022-04-06 08:31:20iritkatrielsetpull_requests: + pull_request30405
2022-04-05 11:49:23iritkatrielsetmessages: + msg416772
2022-04-01 02:42:51corona10setnosy: + corona10
2022-03-31 23:12:06brandtbuchersetmessages: + msg416466
2022-03-31 23:08:14brandtbuchersetnosy: + brandtbucher
2022-03-31 21:41:15iritkatrielsetpull_requests: + pull_request30296
2022-03-31 14:31:47iritkatrielsetpull_requests: + pull_request30291
2022-03-31 13:14:33Mark.Shannonsetnosy: + Mark.Shannon
messages: + msg416431
2022-03-25 15:05:47iritkatrielsetkeywords: + patch
stage: patch review
pull_requests: + pull_request30191
2022-03-25 14:31:09iritkatrielsettitle: Make all jumps relative -> Make all jump opcodes relative
2022-03-25 14:30:53iritkatrielcreate