Skip to content

perf(compound): linearize subscript-span scan in compound element splitting - #987

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/compound-literal-fill
Oct 22, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/compound-literal-fill

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Giant compound literals (a=([0]=..[N]=..)) were O(n^2): split_compound_element_words re-collected the entire remaining input per element just to measure a short [..] span (same shape #618 fixed in two sibling splitters). Now measures the span directly on &str and advances by bytes. No behavior change for other shapes ($(/extglob paths untouched). Tests: lib 686 + coherence fuzz + array quote suites green. 8k literal fill ~850ms->~200ms, 20k ~5.1s->640ms (~8x, linear).

@caomengxuan666
caomengxuan666 merged commit 0aeffe9 into master Oct 22, 2026
8 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/compound-literal-fill 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