-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-95113: Don't use EXTENDED_ARG_QUICK
in unquickened code
#95121
GH-95113: Don't use EXTENDED_ARG_QUICK
in unquickened code
#95121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory the unquickened form of EXTENDED_ARG
should be very rare, so this should have no effect on performance.
So I'm not worried about that.
Could you add a comment to EXTENDED_ARG
explaining why it uses _PyOpcode_Deopt[opcode]
rather than opcode
.
Other than that LGTM.
When you're done making the requested changes, leave the comment: |
One other thing that might merit a comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes things conceptually simpler:
EXTENDED_ARG
/EXTENDED_ARG_QUICK
is now more similar to theJUMP_BACKWARD
/JUMP_BACKWARD_QUICK
situation.- It avoids special-casing
EXTENDED_ARG
with a separate opcode table. - It avoids leaking the
_QUICK
terminology todis
users that theoretically shouldn't have to care.
The tiny downside is that unquickened EXTENDED_ARG
s need one more _PyOpcode_Deopt[...]
memory access, which should be totally insignificant, so LGTM.
Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, @brandtbucher, I could not cleanly backport this to |
…de (pythonGH-95121). (cherry picked from commit e402b26) Co-authored-by: Brandt Bucher <[email protected]>
GH-95143 is a backport of this pull request to the 3.11 branch. |
EXTENDED_ARG_QUICK
in unquickened code #95113Automerge-Triggered-By: GH:brandtbucher