Commit d24e5cb
Claude Agent
Merge planner (Task C) cost-model routing
Brings in `dfa/planner.rs` (~430 LOC): `ScanPlanner`, `ScanContext`,
`ScanPlan` (with reserved `ShiftOr` variant), `ArchProfile` (CPUID
once at construction), and a calibrated `estimated_cost_ns` cost
model. Refactors `FoldedContainsDfa`, `FlatContainsDfa`,
`MultiContainsDfa::scan_to_bitbuf` to dispatch via the planner
into per-path `run_*` helpers; `ssa_saturated` /
`escape_pair_targets` consolidated into the planner module.
Adds `test_planner_matches_legacy_cascade` (12 corpus × needle
pairs from `benches/fsst_like.rs`) plus 11 unit tests covering
each routing decision row. New `VORTEX_FSST_PLAN_TRACE=1` env var
prints planner inputs + chosen plan + estimated cost.
Conflicts resolved:
- `folded_contains.rs`: kept Fat Teddy's accessor methods
(`bucketed_pair_codes_slice`, `single_step_accept_codes_slice`)
AND the planner's `scan_plan_name` refactor.
- `tests.rs`: kept Fat Teddy's `MultiNeedleMatcher` test section
AND the planner's `test_planner_matches_legacy_cascade`
bench-parity regression test.
After all three subagent merges (Shift-Or + Fat Teddy + planner),
210 tests pass with `_test-harness`. `cargo +nightly fmt --all`
clean.
Deferred TODOs preserved:
- Cross-bucket FDR for ESCAPE_CODE in Fat Teddy.
- AVX-512 / NEON variants of `fat_teddy_pass_*`.
- Planner integration of the `ShiftOr` plan (reserved slot
exists; routing decision is still made in `try_new_with`).
Signed-off-by: Claude <noreply@anthropic.com>6 files changed
Lines changed: 1250 additions & 274 deletions
File tree
- encodings/fsst/src/dfa
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| |||
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
179 | | - | |
180 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
181 | 198 | | |
182 | | - | |
183 | 199 | | |
184 | 200 | | |
185 | 201 | | |
| |||
0 commit comments