Skip to content

perf(array): typed-cell reads with dirty-flag invalidation (#914) - #919

Merged
caomengxuan666 merged 3 commits into
masterfrom
fix/array-typed-reads
Oct 20, 2026
Merged

caomengxuan666 merged 3 commits into
masterfrom
fix/array-typed-reads

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Stacked on #917 + #918 (both merged). Executor writes keep the structured cell in sync; builtin-side writes set the dirty flag; reads trust the cell only when clean (debug_assert verifies cell==mirror in test builds). Audit covered all format_indexed_array_storage sites; this PR syncs the 4 remaining executor mirror writes (fail-compound, nameref element, coproc close, wait-pid). Bench: array write+read 2k 2725ms->~73ms, 4k 10453ms->~124ms, 8k linear ~250ms vs bash 67ms. Suite: lib 636 + cli 467 green, executor 11 known Android-env failures (baseline identical).

Audit follow-up: fail-compound empty materialization, nameref
element writes, coproc endpoint close, and wait-pid array writes
now sync_typed_indexed_array + clear the dirty flag, matching the
other executor paths. local_var_scopes fallback audited, untouched
(function-local overlay, not the shared mirror).
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