Landing: a0b77a14fed8
Project / Subsystem
gcc / libstdc++
Date
2026-09-22
Author
Tamar Christina
Commit
a0b77a14fed845f742ef378d6cb911c8d78ed625
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- a0b77a14fed845f742ef378d6cb911c8d78ed625
- source_type
- github
- headline
- libstdc++: Inline simple regex repeating matches in DFS
- tldr
- Optimized regex matching for repeated character classes in libstdc++'s regex engine.
- author
- Tamar Christina
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • regex
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-22T00:00:00.000Z
This change optimizes the Direct Finite State Machine (DFS) NFA shape for repeating regex patterns, such as [\w]+ or #+. It avoids creating unnecessary stack frames for greedy repeats, directly consuming match states when the repeated body returns to the repeat state. This optimization improves performance for various regex patterns, including email and URI matching.