You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 32438c3
Browse filesBrowse the repository at this point in the historyBrowse files
A "\b" becomes a condition with three word classes, because PCRE has other
word characters than ICU. Next to a literal ASCII letter, digit, or "_" that
is not repeated, one side of the boundary is known, so one class is enough:
"\bword\b" is now "(?<![…])word(?![…])". The same holds for "\B".
Measured on PHP 8.5 with PCRE 10.49, on 5.9 MB of text that does not match:
- "\bneedle\b|\bhaystack\b|\bthread\b" takes 7.9 ms, and 54.7 ms before. Without
JIT, it takes 40.7 ms, and 685 ms before.
- "\bneedle\b" takes 1.7 ms, and 3.1 ms before.
- A list of "\bword\b" alternatives compiles with up to 426 words, and with up
to 148 before.
A boundary next to a group, a set, or a repeated character is unchanged.
0 commit comments