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
{{ message }}
Repository navigation
[perf] Incremental reader deep system: batch tokenizer re-lexes O(buffer) per appended line (nvm -n 720x / OpenSSH -n timeout residual) #281
Tracked umbrella for the deep system deferred by perf/perf2 lanes (#241 sibling): per-pass re-tokenization of the accumulating logical line. Includes the captain-owned continuation.rs cost centers (has_unclosed_quotes copies the remaining input per pending ${ — 1644x/4.5s on nvm; slice-passing fix shape documented in perf2's report) and the walker ${-arm recursion (2.5M allocs, needs SubXpassFrame memo semantics).
perf3 round (wt7/perf3 @ c17b6cea) landed the two non-captain umbrella items + the brace_scan twin of the continuation.rs cost:
Walker ${-arm recursion: expand_braced_parameter_fragment_in_word resolves =-free, non-funsub, whole-word fragments inline (GNU anchor subst.c:11229 expand_word_internal single pass → parameter_brace_expand subst.c:9777 inline). SubXpassFrame memo semantics: nested fragment entries land in the enclosing word's frame (site keys (ctx, frag-path, text); sibling fragments cannot false-hit). Probe 15 walker-guard cost 769→508ms, allocs 3.58M→3.04M.
Batch tokenizer complete-command-boundary checkpoint (LexerBoundaryState): a pass ending between tokens checkpoints tokens+lexer state; the next pass lexes only the appended tail (nvm -n tokenize 0.98s→0.5s; probe 17 39.2x→27.9x; probe 20 65.1x→54.0x; bash_completion -n canary 1443ms→750ms). Resume gated on the appended line carrying no } byte (prefix-open { groups fold exactly on the pass their } arrives); brace_scan_cache invalidation discipline + posix/extglob flips.
brace_scan.rs ${-arm zero-copy (has_unclosed_parameter_expansion, skip_braced_parameter_in_chars): the SAME per-${ copy of the entire remaining buffer as continuation.rs, fixed with the existing rubash#185 scan_braced_parameter_body_chars API (slice must INCLUDE the ${ opener).
continuation.rs (captain-exclusive, NOT touched): the proposed verbatim diff for its two ${-arm copies is recorded in docs/PERF-BASELINE.md (perf3 round). Temp-applied measurement: prescan 4540ms→27ms, per-line huq 5325ms→122ms → nvm -n 645x→137x, configure-head 383x→290x.
Stays OPEN: the <60x nvm -n target needs the captain's continuation.rs fix (9.9s of nvm -n's 12.4s) AND a further ~1.6s parse/reader-phase reduction on top (GNU parses nvm.sh in 19ms). Full table + decomposition: docs/PERF-BASELINE.md, perf3 round.
wt70/lextok round landed (2e06da2 on master, one file src/lexer/mod.rs +39/-4, continuation.rs untouched):
Landed: (1) backslash-continuation scan admission gate — ends_with_unquoted_backslash has exactly one true-exit requiring a trailing backslash; gating the call sites on ends_with('\')-parity cuts 5420→121 whole-buffer walks on nvm.sh (22.5→2.3ms); (2) physical-line stamping via newline-offset table + partition_point (3.1→0.07ms), plus removal of perf21's dead Instant residue.
Numbers (interleaved A/B medians, 11 rounds, quiet-window re-verified): nvm -n −13% (GNU ratio 18.0x→15.6x), nvm load −9%. Gates: 537-file corpus 0 differ; true-baseline 18-suite 54/54 byte-identical; canaries byte-identical; failure set identical to master.
Next honest ceilings (measured, this round's stop line): ~26ms = the 60 big fold-completion full re-lexes — the resume checkpoint cannot fold a { before the checkpoint offset, so each big group's closing line re-lexes the whole buffer (skip_brace body walk linear×depth); fix = opener-state LexerBoundaryState checkpoint at bare-{ emission — scanner.rs/mod.rs deep water, own round with full gates. ~12ms = linear small-line lexing (4753 single-line commits) — token-architecture round territory. Residual backslash scans 2.3ms (1.3%, below the honesty bar).
Activity
docs: task board - residual sweep filed (#274-#281), true board 15; d…
caomengxuan666 commentedon Sep 28, 2026
perf3 round (wt7/perf3 @ c17b6cea) landed the two non-captain umbrella items + the brace_scan twin of the continuation.rs cost:
${-arm recursion:expand_braced_parameter_fragment_in_wordresolves=-free, non-funsub, whole-word fragments inline (GNU anchor subst.c:11229 expand_word_internal single pass → parameter_brace_expand subst.c:9777 inline). SubXpassFrame memo semantics: nested fragment entries land in the enclosing word's frame (site keys (ctx, frag-path, text); sibling fragments cannot false-hit). Probe 15 walker-guard cost 769→508ms, allocs 3.58M→3.04M.LexerBoundaryState): a pass ending between tokens checkpoints tokens+lexer state; the next pass lexes only the appended tail (nvm -n tokenize 0.98s→0.5s; probe 17 39.2x→27.9x; probe 20 65.1x→54.0x; bash_completion -n canary 1443ms→750ms). Resume gated on the appended line carrying no}byte (prefix-open{groups fold exactly on the pass their}arrives); brace_scan_cache invalidation discipline + posix/extglob flips.${-arm zero-copy (has_unclosed_parameter_expansion,skip_braced_parameter_in_chars): the SAME per-${copy of the entire remaining buffer as continuation.rs, fixed with the existing rubash#185scan_braced_parameter_body_charsAPI (slice must INCLUDE the${opener).${-arm copies is recorded in docs/PERF-BASELINE.md (perf3 round). Temp-applied measurement: prescan 4540ms→27ms, per-line huq 5325ms→122ms → nvm -n 645x→137x, configure-head 383x→290x.Stays OPEN: the <60x nvm -n target needs the captain's continuation.rs fix (9.9s of nvm -n's 12.4s) AND a further ~1.6s parse/reader-phase reduction on top (GNU parses nvm.sh in 19ms). Full table + decomposition: docs/PERF-BASELINE.md, perf3 round.
perf(#241 #242 #281): walker ${-arm inline fragment resolution, patte…
source: park the batch-tokenizer pipeline per line in the group reade…
perf(#241): nvm parse/load -41%/-32% wall: Rc source threading, fold …
perf(lexer): heredoc bodies are opaque to the group scanners + case-p…
perf(parser): inline if-family section bodies into the main loop (par…
perf(lexer): admission-gate the per-line backslash-continuation scan …
caomengxuan666 commentedon Oct 4, 2026
wt70/lextok round landed (2e06da2 on master, one file src/lexer/mod.rs +39/-4, continuation.rs untouched):
Landed: (1) backslash-continuation scan admission gate —
ends_with_unquoted_backslashhas exactly one true-exit requiring a trailing backslash; gating the call sites onends_with('\')-parity cuts 5420→121 whole-buffer walks on nvm.sh (22.5→2.3ms); (2) physical-line stamping via newline-offset table + partition_point (3.1→0.07ms), plus removal of perf21's dead Instant residue.Numbers (interleaved A/B medians, 11 rounds, quiet-window re-verified): nvm -n −13% (GNU ratio 18.0x→15.6x), nvm load −9%. Gates: 537-file corpus 0 differ; true-baseline 18-suite 54/54 byte-identical; canaries byte-identical; failure set identical to master.
Next honest ceilings (measured, this round's stop line): ~26ms = the 60 big fold-completion full re-lexes — the resume checkpoint cannot fold a
{before the checkpoint offset, so each big group's closing line re-lexes the whole buffer (skip_brace body walk linear×depth); fix = opener-state LexerBoundaryState checkpoint at bare-{emission — scanner.rs/mod.rs deep water, own round with full gates. ~12ms = linear small-line lexing (4753 single-line commits) — token-architecture round territory. Residual backslash scans 2.3ms (1.3%, below the honesty bar).Decomposition artifacts: rubash-wt-lextok/target/lextok/ + target/issue-suites/results/lextok/.
docs(readme): evidence-first restructure with cross-platform identity…
perf(executor): per-file glob match without staging allocs (#681) (#685)