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
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. |
I think this makes things conceptually simpler:
EXTENDED_ARG/EXTENDED_ARG_QUICKis now more similar to theJUMP_BACKWARD/JUMP_BACKWARD_QUICKsituation.- It avoids special-casing
EXTENDED_ARGwith a separate opcode table. - It avoids leaking the
_QUICKterminology todisusers that theoretically shouldn't have to care.
The tiny downside is that unquickened EXTENDED_ARGs need one more _PyOpcode_Deopt[...] memory access, which should be totally insignificant, so LGTM.
|
Thanks @brandtbucher for the PR |
|
Sorry, @brandtbucher, I could not cleanly backport this to |
…de (pythonGH-95121). (cherry picked from commit e402b26) Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
|
GH-95143 is a backport of this pull request to the 3.11 branch. |
Automerge-Triggered-By: GH:brandtbucher