100%

Salsa Integration Optimization (ledger grind)

Goal

LEDGER GRIND-CYCLE section. 05.1 must isolate input-setup BEFORE attributing the §01 ~17.5x overhead to query granularity. Grind 05.2/05.3 micro-bench -> ledger. 05.4 is a gated decision, not a pre-commitment.

Work Items

  • Isolate input-setup from query-recompute in the salsa_overhead bench (the §01 caveat: the bench constructs a fresh SourceFile + query per iteration, including input-setup, not pure recompute).
  • GRIND: query granularity tuning (lex_result/tokens/parsed early-cutoff) -> micro-bench -> ledger cycle -> repeat.
  • GRIND: incremental-parse activation (copier.rs infra exists but inactive) -> micro-bench -> ledger cycle -> repeat.
  • Decision gate: if 06 macro-benchmarks confirm Salsa is a massive bottleneck (vs the isolated input-setup cost from 05.1), enact the roll-our-own incremental-system option via an INLINE /create-plan adding a dedicated section with its own benchmarks — NOT pre-emptively (pocket option per user 2026-06-17).