8000 minor optimization in the implementation of except* · Issue #101169 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

minor optimization in the implementation of except* #101169

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

Closed
iritkatriel opened this issue Jan 19, 2023 · 0 comments · Fixed by #101170
Closed

minor optimization in the implementation of except* #101169

iritkatriel opened this issue Jan 19, 2023 · 0 comments · Fixed by #101170
Labels
type-bug An unexpected behavior, bug, or error

Comments

@iritkatriel
Copy link
Member
iritkatriel commented Jan 19, 2023

The except* bytecode was implemented before we switched to SWAP/COPY, and the move to them resulted in bytecode that contains one more instruction than necessary:

COPY 1
BUILD_LIST
SWAP 2

can be written as

BUILD_LIST
COPY 2

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0