ReviewOS

zig-utils/zig-js

JIT: close packed-array optimizer checkpoint with broad evidence

#453
Closed chris opened this 9 days ago ·
9 days ago

Parent: #449 Roadmap: #133, #146, #134 Predecessors: #448, #450, #451, #452

#452 completes guarded direct and rooted reallocating/variadic push. Finish the packed-array optimizer checkpoint with one broad evidence batch after adjacent implementation work settles; do not rerun expensive repository-wide gates per child.

Acceptance

  • Audit the combined #448-#452 diff for exact Array/prototype semantics, GC barriers and roots, OOM atomicity, invalidation, step ownership, shared mutation, and canonical guard misses.
  • Reconfirm the published arrays workload tier counters against the saved exact-parent profile; keep VM packed-push/sum priority unless a complete accepted matrix justifies a change.
  • Publish a focused exact-parent optimizer-region witness that quantifies the direct/narrow/canonical dispatch split required by #133 without replacing the accepted application comparison matrix.
  • Run the full unit suite once for the combined checkpoint, not once per predecessor.
  • Run the no-GIL suite and suppression-free TSan gate once for the combined checkpoint; record exact commands and results.
  • Re-run release compatibility and documentation/publication guards after concurrent main changes settle.
  • Update and close #449/#133 when their remaining acceptance is evidenced; update #146/#134 child maps without overstating unrelated release gates.

Result

The exact-parent focused witness in bb0c54e7/7b844aca runs the same 20,000-iteration moving-GC optimizer loop on parent db91caba and candidate. Parent: direct 19,564, general 14. Candidate: direct 19,564, narrow 14, actual growth 14, general 0. Every measured reallocation leaves general dispatch without adding callbacks to the direct path.

The published arrays CPU profile remains owned by VM packed-push/sum kernels, so tier priority and accepted README benchmark scores remain unchanged.

Combined completion evidence at bad067d8/8ec55296:

  • unit shards 353/353 + 352/352 + 352/352 + 352/352 = 1,409/1,409;
  • no-GIL array corpus 3/3 normally;
  • the same 3/3 under TSan with halt_on_error=1 and no suppressions;
  • benchmark publication/validation harnesses 4 + 7 + 11 + 7 passed;
  • release compatibility 6/12 green, private ABI pending 0.

The broad run exposed one order-dependent test fixture: the allocating direct-path step witness inherited process-global shared mode. bad067d8 now saves/disables/restores that mode, matching companion direct-array tests; the exact failing shard passes 352/352. No production behavior changed.

9 days ago

Focused exact-parent attribution is complete in bb0c54e/7b844ac. The identical 20,000-iteration moving-GC workload passes 4/4 on parent db91cab and candidate: parent direct=19,564/general=14; candidate direct=19,564/narrow=14/growth=14/general=0. This removes 100% of measured reallocations from general dispatch without adding callbacks to the direct path. The published arrays workload profile remains VM-kernel-owned, so accepted README scores remain unchanged.

9 days ago

Completed through 8ec5529. Exact-parent attribution, 1,409/1,409 unit shards, normal and suppression-free TSan no-GIL array corpus gates, benchmark publication guards, and release compatibility are recorded in the issue and checked-in profile.

Sign in to comment on this issue.