Evaluate sum-of-products assignments on raw doubles, boxing once#2611
Merged
Conversation
M[i][j] = M1[i][0]*M2[0][j] + M1[i][1]*M2[1][j] + ... - the dromaeo-3d-cube MMulti/VMulti kernel shape - boxed a transient JsNumber per binary node (~7 per matrix cell, 51% of the cube's allocation in the Phase-0 census). Assignment right-hand sides that form a left-deep +/- chain of two or more products over pure-readable numeric leaves now compute on raw doubles and box a single result. Safety and semantics: - leaves are numeric constants, slot/global identifiers and dense computed reads with identifier bases; every runtime read is pure, so a decline (leaf not dense, not a Number, TDZ) falls back to generic tree evaluation with no observable double effects - a Proxy-trap count test pins exactly-once evaluation on decline - double arithmetic IS the spec arithmetic (Number::multiply/add), so integer-valued leaves produce identical results; 0 * negative correctly yields -0 (Object.is-pinned) - the accumulator seeds from the first term rather than +0 - a phantom leading zero would turn a (-0) + (-0) sum into +0 - and only left-deep chains arm, so the linear fold reproduces the tree's association and floating-point rounding exactly - armed only for all-product chains (>= 2 terms), a shape integer-heavy workloads don't produce - their dedicated per-op integer paths never see this probe Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lahma
added a commit
that referenced
this pull request
Jul 9, 2026
Full re-run after the 2026-07 interpreter-parity campaign (#2600-#2606, #2608-#2611). Highlights vs the 2026-07-07 refresh: dromaeo-core-eval -40% (1.52 -> 0.92 ms, taking first place from NiL.JS), dromaeo-3d-cube -19% time / -35% allocation (7.38 -> 5.99 ms, moving ahead of NiL.JS - only the IL-compiling engine remains faster), stopwatch -7% (tied with the best interpreter, ahead of Jurassic), stopwatch-modern -13% (tied with Jurassic), object-array -10%, object-regexp -13%, object-string -5%. Competitor versions unchanged; their rows served as thermal canaries (all within a few percent of the previous refresh). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 13, 2026
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.
What
M[i][j] = M1[i][0]*M2[0][j] + M1[i][1]*M2[1][j] + …— the dromaeo-3d-cube MMulti/VMulti kernelshape — boxed a transient
JsNumberper binary node (~7 per matrix cell; 51% of the cube'sallocation in this campaign's Phase-0 census). Assignment right-hand sides that form a left-deep
±chain of two or more products over pure-readable numeric leaves now compute on raw doubles andbox a single result.
Leaves are numeric constants, slot/global identifiers, and one- or two-level dense computed reads
with identifier bases (
v[0],m[i][j]).Safety and semantics
TryGetValueFastdense probes),so a decline — leaf not dense, not a Number, TDZ — falls back to generic tree evaluation with no
observable double effects. A Proxy-trap count test pins exactly-once evaluation on decline.
Number::multiply/add), so integer-valued leavesproduce identical results;
0 * negativecorrectly yields−0(Object.is-pinned).+0— a phantom leading zero would turn a(−0) + (−0)sum into+0(a pin caught this during development) — and only left-deep chainsarm, so the linear fold reproduces the tree's association, and therefore its floating-point
rounding, exactly.
their dedicated per-op integer paths never see this probe (the constraint from the earlier
unboxed-islands attempt).
Results
A/B vs main (default job; base side via source checkout since the change was committed):
Gating
All-TFM build ✅ · Jint.Tests ×2 ✅ · PublicInterface ×2 ✅ · Test262 99,426/0 ✅
🤖 Generated with Claude Code