Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

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

Appearance settings

gh-139757: Add _GUARD_NOS_COMPACT_ASCII for compact ascii optimization#143332

Merged
corona10 merged 3 commits into
python:mainpython/cpython:mainfrom
corona10:gh-139757-guard-asciicorona10/cpython:gh-139757-guard-asciiCopy head branch name to clipboard
Jan 2, 2026
Merged

gh-139757: Add _GUARD_NOS_COMPACT_ASCII for compact ascii optimization#143332
corona10 merged 3 commits into
python:mainpython/cpython:mainfrom
corona10:gh-139757-guard-asciicorona10/cpython:gh-139757-guard-asciiCopy head branch name to clipboard

Conversation

@corona10

@corona10 corona10 commented Jan 1, 2026

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.

Comment thread Python/bytecodes.c Outdated
Comment thread Python/optimizer_bytecodes.c Outdated
Comment thread Python/bytecodes.c
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.