Skip to content

gh-145749: Optimize named exception blocks#145983

Draft
bkap123 wants to merge 3 commits intopython:mainfrom
bkap123:named-exception
Draft

gh-145749: Optimize named exception blocks#145983
bkap123 wants to merge 3 commits intopython:mainfrom
bkap123:named-exception

Conversation

@bkap123
Copy link
Contributor

@bkap123 bkap123 commented Mar 15, 2026

Instead of using LOAD_CONST None; STORE_FAST n; DELETE_FAST n for named exception blocks, I changed the bytecode to use PUSH_NULL; STORE_FAST n in an effort to remove the DELETE_FAST instruction.

Not sure if I need a NEWS entry

@Fidget-Spinner
Copy link
Member

Deleting a tier 1 (base interpreter) bytecode needs a news entry.

@bkap123 bkap123 marked this pull request as draft March 15, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants