Repository navigation
Commit 6af149e
* fix(signals): net staged rewrites a custom equals calls equal to the committed value (D-8, #4483)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
* fix(signals): gate the custom-equals netting on the verdict engine
Only isPending/latest read the netted test before a commit, so the
write-back staging is gated on observeFlightHook and bundles without the
verdict engine pay 0 B. Drops the floor re-records and Size-Exception.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
* chore(size): re-record over next @ d0fc285
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
* perf(signals): skip the custom-equals netting under the default comparator
A rewrite loop over a staged signal (CodSpeed propagation:avoidable,
updateSignals:update1to1000) ran the uninitialized/shown-error checks and
isSame on every write. Under the default comparator only the committed
object is equal and `v` is already it, so one load of `_equals` decides.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
* perf(signals): share setSignal's comparator test between the gate and D-8 netting
CodSpeed (simulation, --no-opt so setSignal runs as Sparkplug code) put
`propagation:avoidable` 5.3% behind next: every staged rewrite paid a
fresh `_equals` load and a strict compare for the netting, ~120
instructions a write under callgrind, on a bench that is 2,000 staged
rewrites per iteration.
With the verdict engine installed, `custom` (`_equals !== isEqual`) is now
taken once: the gate runs the default comparator's `===` inline instead of
calling `isSame`, and the netting tests the local. Without the engine
`custom` is `null`, so the gate folds to the plain `isSame` call and the
netting away: every store-free / non-verdict client bundle is byte for
byte next's (hello world 9,973 B).
callgrind, Ir per bench iteration (CodSpeed's V8 flags): next 3,294,205;
PR head 3,536,042 (+7.3%); this 3,122,267 (-5.2% vs next).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
---------
Co-authored-by: Claude <[email protected]>
1 parent 20c115c commit 6af149e
3 files changed
Lines changed: 95 additions & 2 deletions
File tree
- .changeset
- packages/signals
- src/core
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2543 | 2543 | | |
2544 | 2544 | | |
2545 | 2545 | | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
2546 | 2553 | | |
2547 | 2554 | | |
2548 | 2555 | | |
2549 | | - | |
| 2556 | + | |
2550 | 2557 | | |
2551 | 2558 | | |
2552 | 2559 | | |
| |||
2568 | 2575 | | |
2569 | 2576 | | |
2570 | 2577 | | |
2571 | | - | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
2572 | 2594 | | |
2573 | 2595 | | |
2574 | 2596 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
0 commit comments