Skip to content

perf(assoc): plain-$name subscript fast lane - #985

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/assoc-leftover
Oct 22, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/assoc-leftover

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Assoc remaining cost was per-read/per-write subscript expansion (3 walker passes per op). New whitelist fast lane in expand_subscript_string_inner for prefix$name+suffix shapes: single plain read, no quotes/backslash/backtick/paren/brace/second-$, no C0/PUA bytes, no leading ~, no nounset, no dynamic names, marker-free values (all fall through). Byte-identical to slow path (same dynamic->shell->env chain, GNU subst.c:11063). Tests: lib 687 + coherence fuzz + 89 assoc/array/subscript integration green; 22-case GNU differential. Assoc interleave 8k: 3.5x->2.6x (linear, ~3.1x asymptote).

@caomengxuan666
caomengxuan666 merged commit a62c572 into master Oct 22, 2026
8 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/assoc-leftover branch October 22, 2026 00:57
caomengxuan666 added a commit that referenced this pull request Oct 22, 2026
docs(readme): ledger release qualifier + perf #984/#985/#986/#987/#990
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant