Optimize numeric array raw payload helpers - #4957
Merged
Merged
Conversation
proggeramlug
pushed a commit
that referenced
this pull request
Jun 11, 2026
The numeric-array fast path from #4957 (90bc7bc) added a raw ptr::write without a GC_STORE_AUDIT marker, so the GC store-site inventory gate has been red on main since it merged — every PR's lint fails on it. The write is POINTER_FREE: the RawF64-layout check guarantees the slot holds a plain f64, never a NaN-boxed pointer.
proggeramlug
added a commit
that referenced
this pull request
Jun 11, 2026
…istening' round-trip (#4914) (#4963) * feat(cluster): workers share a listening port via SO_REUSEPORT + IPC listening round-trip (#4914) - All 4 TCP listen sites (http/https/http2 in perry-ext-http-server, net.rs) bind with SO_REUSEPORT when NODE_UNIQUE_ID marks a cluster worker, so N workers share one port. - Worker reports the bound address to the primary over the fork IPC channel ({cmd:"NODE_CLUSTER", act:"listening"}); primary emits 'listening' on the worker and the cluster object Node-style. - Cluster-level lifecycle events: 'online' (deduped between the spawn event and the internal online message), 'disconnect', 'exit' (worker, code, signal). - cluster.fork of the compiled binary itself now execs it directly instead of `node <native-binary>` (the default exec is current_exe; a native executable can't run under node). - fork honors explicit `silent: false` (cluster's default) as inherit-stdio, matching Node; absent silent keeps the historical pipe default, explicit stdio still wins. - Un-stub cluster fork/setupPrimary/setupMaster in the API manifest; regen docs; update stub_inventory drift guards. - e2e test: primary forks 2 workers, both bind one shared port, requests round-trip, listening/exit events observed. SCHED_RR fd-passing and the primary-coordinated shared ephemeral port for listen(0) are tracked in #4962. Closes #4914 * fix(lint): GC_STORE_AUDIT marker for the #4957 raw-f64 payload write The numeric-array fast path from #4957 (90bc7bc) added a raw ptr::write without a GC_STORE_AUDIT marker, so the GC store-site inventory gate has been red on main since it merged — every PR's lint fails on it. The write is POINTER_FREE: the RawF64-layout check guarantees the slot holds a plain f64, never a NaN-boxed pointer. --------- Co-authored-by: Ralph Küpper <ralph@skelpo.com>
This was referenced Jun 11, 2026
proggeramlug
added a commit
that referenced
this pull request
Jun 11, 2026
…lowering (#4984) bounded_integer_array_store_omits_layout_note_and_barrier has failed on main since #4957 (90bc7bc, bisect-confirmed): its `for (i=0; i<arr.length; i++) arr[i] = i` body is exactly the shape the new match_numeric_bulk_fill_loop matcher recognizes, so the loop now lowers to `js_array_fill_f64_iota_len_extend` and the per-element `js_array_numeric_set_f64_unboxed` the test asserts on is never emitted. Every PR's required cargo-test check is red until this lands. Store `i + 1` instead — integer-classified but neither iota nor constant, so the bulk matcher doesn't fire and the test keeps exercising the per-element guarded store path it was written for. Add a companion test pinning the new bulk lowering itself: iota fill over `arr.length` emits the bulk helper, no per-element stores, and (like the per-element path) no slot-layout note or write barrier. Co-authored-by: Ralph Küpper <ralph@skelpo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Performance
Before vs after, median of 3 local runs with Node and Bun included for comparison:
bench_string_heavy.ts: Perry 338 ms -> 61 ms (82.0% faster); Node 47 ms, Bun 32 ms after.10_nested_loops.ts: Perry 13483 ms -> 4347 ms (67.8% faster); Node 19 ms, Bun 19 ms after.11_prime_sieve.ts: Perry 1503 ms -> 558 ms (62.9% faster); Node 8 ms, Bun 6 ms after.03_array_write.ts: Perry 3733 ms -> 3390 ms (9.2% faster); Node 12 ms, Bun 9 ms after.04_array_read.ts: Perry 3700 ms -> 3340 ms (9.7% faster); Node 12 ms, Bun 19 ms after.Tests
cargo test -p perry-runtime numeric_array --quiettest-files/test_array_methods.tstest-files/test_array_slice.tstest-files/test_array_of_objects.tsbenchmarks/suite/03_array_write.tsbenchmarks/suite/04_array_read.tsbenchmarks/suite/bench_string_heavy.tscargo build -p perry --release --quiet