Skip to content

Commit 9e998a4

Browse files
committed
SH3-5 round 3: Rust AST perf — Copy ShapeCk + step-level FIRST pre-filters: 7.4x → 5.9x vs CST
- ShapeCk is now Copy: drop lists_len/holes_len + Rc suppress snapshots; suppress writes go through set_/take_ setters that append old values to suppress_log, restore replays back to a log watermark — no Rc refcount churn per checkpoint (~4.4M ck/restore pairs on the 2MB bench) (O4) - Step-level FIRST pre-filters (O5): per-rule leading FIRST built once per emit (buildRustShapeRuleFirst; null = unknown); sound seq FIRST via rustShapeFirstOfSteps (fully-nullable seqs get no guard). alt branch pick, star exit walk, opt, and sep leading element skip the doomed ck + walk + restore when the current token misses FIRST - emitRustAstRdAltSteps: drop unused listsVar/holesVar plumbing - Gates: test/shape-rust.ts 32/32; accept-corpus TS↔Rust iso 0/500, toy 0/2254, typescript accept 2000 cases shapeDiv=0 - 2MB paired: median ast/cst 5.86x (was 7.43x, −21%)
1 parent 44280d4 commit 9e998a4

1 file changed

Lines changed: 188 additions & 51 deletions

File tree

0 commit comments

Comments
 (0)