Repository navigation
Commit 2d2a190
bench(signals): amortize projection-root-write over 20 commits per body
Three benchmarks share one process and one set of 20k-key fixtures, and
each body performed a single commit. V8 emits a one-off ~100k-instruction
tier-up chunk that attaches to whichever frame is running when it fires and
lands in exactly one of the three windows — at ~540k Ir per root write that
is 16-20% of a window, and it moves between windows on unrelated changes.
CodSpeed's bisection of #3431 (2026-09-14) made this exact: a change costing
~300 instructions on its own path read as -8.9% on the root write and x2.4
on the untouched nested write; a provably no-op extra call added to `next`
read as -5.5% on the root write and +22% on the untouched store setter
(537,655 → 508,044 and 513,411 → 627,428 Ir; every reactive-graph symbol
bit-identical).
Each body now runs COMMITS = 20 commits. The chunk amortizes to <1% of a
window — below the 5% gate — and the three stay per-commit comparable,
which is the parity this file guards (#3352 derive vs #3044 setter floor).
Absolute numbers re-baseline ×20.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>1 parent c3ae310 commit 2d2a190
1 file changed
Lines changed: 29 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
9 | 21 | | |
10 | 22 | | |
11 | 23 | | |
12 | 24 | | |
| 25 | + | |
13 | 26 | | |
14 | 27 | | |
15 | 28 | | |
| |||
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
61 | | - | |
62 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
63 | 78 | | |
64 | 79 | | |
65 | 80 | | |
66 | | - | |
67 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
68 | 85 | | |
69 | 86 | | |
70 | 87 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
77 | 96 | | |
78 | 97 | | |
0 commit comments