bpo-39156: Break up COMPARE_OP into four logically distinct opcodes.#17754
Merged
markshannon merged 4 commits intopython:masterfrom Jan 14, 2020
Merged
bpo-39156: Break up COMPARE_OP into four logically distinct opcodes.#17754markshannon merged 4 commits intopython:masterfrom
markshannon merged 4 commits intopython:masterfrom
Conversation
3f4e3d4 to
2ee4c16
Compare
ZackerySpytz
reviewed
Jan 9, 2020
Contributor
ZackerySpytz
left a comment
There was a problem hiding this comment.
I have some minor comments.
Doc/library/dis.rst
Outdated
Contributor
There was a problem hiding this comment.
This should be wrapped at 80 chars.
Python/ceval.c
Outdated
Contributor
There was a problem hiding this comment.
I think PyTuple_GET_SIZE() should be used here.
Python/ceval.c
Outdated
Python/ceval.c
Outdated
Contributor
There was a problem hiding this comment.
IMO, this check for res > 0 should not be included.
COMPARE_OP for rich comparisons IS_OP for 'is' and 'is not' tests CONTAINS_OP for 'in' and 'is not' tests JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
3e24674 to
8dbef33
Compare
8dbef33 to
1486559
Compare
8f56c51 to
449cb17
Compare
449cb17 to
5c9a327
Compare
shihai1991
pushed a commit
to shihai1991/cpython
that referenced
this pull request
Jan 31, 2020
…ythonGH-17754) Break up COMPARE_OP into four logically distinct opcodes: * COMPARE_OP for rich comparisons * IS_OP for 'is' and 'is not' tests * CONTAINS_OP for 'in' and 'is not' tests * JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaks up COMPARE_OP into four logically distinct opcodes:
This improves the clarity of the interpreter and should provide a modest speedup.
https://bugs.python.org/issue39156