Commit 91dc88a
Eliminate capture groups from regexp_replace optimization
Split anchored ^prefix(capture)suffix.*$ patterns into separate prefix
and content regexes (no capture groups). Uses two find() calls instead
of captures() + expand(), avoiding capture-group tracking overhead and
String allocation in the hot loop.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ab44f24 commit 91dc88a
1 file changed
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 280 | + | |
284 | 281 | | |
285 | 282 | | |
286 | 283 | | |
| |||
588 | 585 | | |
589 | 586 | | |
590 | 587 | | |
591 | | - | |
592 | | - | |
593 | | - | |
| 588 | + | |
594 | 589 | | |
595 | 590 | | |
596 | 591 | | |
| |||
0 commit comments