Skip to content

gh-152054: Speed up matching of case-insensitive character sets#152055

Open
eendebakpt wants to merge 1 commit into
python:mainfrom
eendebakpt:re_case_insensitive
Open

gh-152054: Speed up matching of case-insensitive character sets#152055
eendebakpt wants to merge 1 commit into
python:mainfrom
eendebakpt:re_case_insensitive

Conversation

@eendebakpt

@eendebakpt eendebakpt commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

See corresponding issue for details.

Handle IN_IGNORE, IN_UNI_IGNORE and IN_LOC_IGNORE in SRE(count) so that a
repeated case-insensitive set (e.g. [a-z]+ with re.I) scans inline instead
of falling back to the per-character match loop.  About 2x faster.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant