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
* fix: remove false DFA downgrade for (?m)^ multiline patterns
adjustForAnchors() incorrectly routed (?m)^ patterns from UseDFA to
UseNFA, claiming DFA can't verify multiline line anchors. The lazy DFA
already handles (?m)^ correctly via StartByteMap/StartLineLF — identical
to Rust regex approach. Verified with direct DFA tests.
The downgrade caused 4 LangArena patterns (api_calls, post_requests,
passwords, sessions) to use byte-by-byte NFA scan instead of DFA —
catastrophic on ARM64 without SIMD (LogParser 2s -> 14s on M1).
LangArena total: 2335ms -> 185ms (12.6x faster).
Root cause: docs/dev/research/v01216-arm64-regression.md
* fix: restore partial prefilter for (?i) alternation overflow + guard NFA candidate loop
Literal extractor returned empty Seq on cross-product overflow (>250),
killing all prefilter literals for patterns like (?i)(eval|system|exec|...).
Now trims to 3-byte prefixes + dedup (Rust approach), marks inexact.
Also guards NFA candidate loop with IsComplete() — incomplete prefilters
cannot be used as correctness gates (would miss branches whose literals
were truncated). NFA falls through to full scan instead.
suspicious: UseNFA without prefilter (113ms) -> with FatTeddy (1ms).
Stdlib compat: 38/38 PASS.
* fix: restore UseTeddy for (?m)^ patterns — lineAnchorWrapper makes it safe
selectLiteralStrategy blocked UseTeddy for any pattern with anchors, but
adjustForAnchors already wraps prefilter with WrapLineAnchor for (?m)^.
Added hasNonLineAnchors to allow UseTeddy when anchors are only (?m)^.
http_methods on macOS ARM64: 89ms -> <1ms (restored to v0.12.14 level).
Stdlib compat: 38/38 PASS.
* docs: update CHANGELOG and README for v0.12.17
0 commit comments