Issue #2543: Regex engines as code per pattern: S2 as code, regex::OnePass, regex::Literal

Open and answer this issue on GitHub.

ready · opened 2026-11-21 · updated 2026-11-21 · 0 comments

Part of #673 After #2540 Needs #906

What it is

The engines written as code per pattern in std, on ADR-specialization-1’s mechanism (comptime? self, emitted per known pattern; ADR-regex-1 D4, D6, D10): S2 as code under the unroll limit, S1 OnePass for anchored group extraction, S0 Literal. This is step 7 of #673; each is measured against the benchmark of step 5 (#2540).

To build

  1. S2 as code: a regex::Dfa whose table is under the unroll limit is emitted as code. Measured against benches/regex/.
  2. S1 regex::OnePass: groups extracted anchored over the located span. Differential test and measurement as in #2540.
  3. S0 regex::Literal. Differential test and measurement as in #2540.

Done when

S2 as code, S1 and S0 pass the differential test of #2540 and each has a counted row in benches/regex/; the commit of item 3 says Fixes #N.

Split from #673 by Claude Code

Back to Open Issues