◐ Shell
clean mode source ↗

gh-139757: Add _GUARD_NOS_COMPACT_ASCII for compact ascii optimization by corona10 · Pull Request #143332 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@corona10

@corona10 corona10 commented

Jan 1, 2026

edited

Loading

Copy link Copy Markdown

Member

Introduce _GUARD_NOS_COMPACT_ASCII for the compact ASCII optimization path.
Although this guard is potentially more expensive than _GUARD_NOS_UNICODE, it helps the optimizer exit earlier when it attempts to optimize BINARY_OP_SUBSCR_STR_INT.

@corona10 corona10 merged commit 315f474 into python:main

Jan 2, 2026

72 checks passed

@corona10 corona10 deleted the gh-139757-guard-ascii branch

January 2, 2026 11:58

thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request

Feb 15, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes

@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

@tomasr8 tomasr8 Awaiting requested review from tomasr8 tomasr8 is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@corona10 @Fidget-Spinner