-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Remove irregular stack effects #105678
Labels
performance
Performance or resource usage
Comments
markshannon
added a commit
that referenced
this issue
Jun 13, 2023
carljm
added a commit
to carljm/cpython
that referenced
this issue
Jun 16, 2023
carljm
added a commit
that referenced
this issue
Jun 16, 2023
gvanrossum
pushed a commit
to gvanrossum/cpython
that referenced
this issue
Jun 18, 2023
@markshannon Can this be closed yet? I doubt that we'll be removing conditional stack effects (at least conditional pushes). Note that we now support conditional pushes in the final op of a macro. (If needed the same approach could be used to support conditional pops in the first op.) |
Yes, this can be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As we move towards generating more components from the instruction definition file (bytecodes.c), it helps if the instructions have regular formats and stack effects.
Currently the stack effects can be simple, variable, conditional or complex.
oparg
)oparg * k
items.oparg & 1
oparg
.We can easily get rid of the complex case. There are only two cases,
MAKE_FUNCTION
andFORMAT_VALUE
. Both can easily broken down into simple (and faster) parts.We might want to get rid of condition stack effects, as it would simplify things, but performance may suffer as both
LOAD_GLOBAL
andLOAD_ATTR
are conditional and they are performance critical.Linked PRs
The text was updated successfully, but these errors were encountered: