- Notifications
You must be signed in to change notification settings - Fork483
Open
Labels
Description
In particular, PCRE2's JIT seems to optimize this particular pattern quite well, even when its UCP mode is enabled. SeeBurntSushi/ripgrep#3167 for an example.
Note that if you disable Unicode mode for Rust regexand have theperf-dfa-full crate feature enabled, then performance for(?m)^\w+$ improves quite a bit. This is because the pattern becomes so small that a full DFA is built. This in turn permits state acceleration, which lets it skip around usingmemchr on\n.