@zakkster/lite-signal 1.5.0-beta.6 → 1.5.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/CHANGELOG.md +63 -37
  2. package/README.md +38 -37
  3. package/llms.txt +44 -37
  4. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -347,43 +347,69 @@ tolerances (`frame.avg` 5% rolling / 10% floor, `frame.p99` and `phase.write.p99
347
347
  18% / 30%), four workloads mapping to public bench claims -- carries forward
348
348
  from 1.4.0. Details in `harness/VersionMatrix/README.md`.
349
349
 
350
- ### Verified -- fresh 1.5.0-beta bench sweep
351
-
352
- Both benches were re-run in full on the 1.5.0-beta engine and their outputs
353
- committed to `bench/results.txt` (isolated propagation, 9 scenarios) and
354
- `bench/resultsReactive.txt` (cross-framework reactivity, median-of-10, 34
355
- tests). The 10 raw reactive-suite runs sit under `bench/bench-runs-reactive/
356
- run_1.txt` ... `run_10.txt` so anyone can re-median independently.
357
-
358
- - **Propagation bench (results.txt):** lite +48% / +45% / +33% / +29% on the four
359
- allocation-heavy scenarios (SELECTIVE DAG / DYNAMIC DAG / MUX / SMALL
360
- SELECTIVE); **LARGE WEB APP flipped into a small lite win (+2%, from -3% on
361
- 1.4.0)** after the alien-signals 3.1.2 -> 3.2.1 bump between sweeps; parity on
362
- WIDE DENSE (-6%) and KAIROS (-7%); alien ahead on BROADCAST (-12%) and DEEP
363
- CHAIN (-14%, narrowed from -29% on 1.4.0 for the same alien-version reason
364
- -- lite's DEEP CHAIN barely moved, 395 -> 398ms). Speed wins vs alien: **5/9**
365
- (was 4/9); heap wins: 8/9.
366
- - **Reactive suite (resultsReactive.txt):** fastest of five frameworks on all
367
- five `dyn` rows (simple +19%, dynamic +16%, large web app +9%, wide dense +6%,
368
- deep +12%), and **lite now leads alien on ALL 7 `S: updateComputations` rows**
369
- this sweep (+3% / +6% / +3% / +12% / +3% / +2% / +8%; was 4/7 on 1.4.0).
370
- - **Andrii Volynets js-reactivity-benchmark position holds at 4th of 15** with
371
- geomean **79.3ms** (raw log `bench/AndriiVolynetsReactiveBench.log`); lite is
372
- ahead of 5th-place Preact Signals (99.8) by ~21% -- the gap widened this
373
- sweep after Preact's own regression on the newer 1.14.2. Top-3 count moved
374
- from 21/47 (1.3.0 log) -> 23/47 (1.4.0 log) -> **25/47 (1.5.0-beta log)**;
375
- outright-fastest-of-15 wins fluctuate at the top of a very tight leaderboard
376
- where alien-signals / reflex / lite trade sub-percent margins per shape (5
377
- outright wins on 1.4.0, **2 outright wins on 1.5.0-beta** -- `createComputations4to1`
378
- and `1000x5 - 25 sources (wide dense)`). The stable metric across every
379
- published sweep is the geomean rank at #4 of 15.
380
- - **Third-party version bumps** used in this sweep vs 1.4.0: alien-signals
381
- 3.1.2 -> 3.2.1, @preact/signals-core 1.14.1 -> 1.14.2, @vue/reactivity
382
- 3.5.13 -> 3.5.35, solid-js 1.9.12 -> 1.9.13. Any within-lib delta between
383
- the two sweeps reflects those bumps + host noise, not lite-signal changes:
384
- 1.4.0 -> 1.5.0 hot-path bytes are byte-identical (1.5.0 adds only the
385
- non-callable box handle shape, which affects construction cost and handle
386
- ergonomics but not the pooled-node read/write path).
350
+ ### Verified -- fresh 1.5.0-beta bench sweep (Apple M4 Pro / Node 26)
351
+
352
+ Both v3 instruments were re-run in full on the 1.5.0-beta engine on **Apple
353
+ M4 Pro darwin/arm64, Node 26.3.1** (a step up from the 1.4.0 sweep's 2016
354
+ Intel MacBook / Node 22 host), with `#STAMP`-verified outputs committed to
355
+ `bench/rb.txt` (microscope aggregate, 4 engines across the six first-party
356
+ shapes) and `bench/r.txt` (mirror sweep, Andrii's canonical adapter verbatim,
357
+ lite vs alien across 47 rows, isolated-per-row, 10 reps). The M4 Pro host has
358
+ a lower run-to-run noise floor than the old Intel host, so the sub-percent
359
+ parity band tightens and the honest wins/losses stand out cleanly.
360
+
361
+ - **Microscope aggregate (rb.txt):** on the six v3 microscope shapes, lite
362
+ wins vs alien on **MUX +34.6%** (fan-in), **SELECTIVE DAG +20.0%**, and
363
+ **DYNAMIC DAG +18.4%** -- the allocation-heavy dynamic shapes stay lite's
364
+ home turf; the wins narrow versus the older Intel sweep (fast machine has
365
+ less GC pause to hide behind, so alien's raw propagation surfaces more) but
366
+ the ordering is intact. **BROADCAST is a true tie** (-1.2%, both under the
367
+ GC delta floor). Alien ahead on **KAIROS -15.7%** (1000 shared-source
368
+ computeds -- alien's flatter representation prices in the walk cheaper on
369
+ M4-class silicon) and **DEEP CHAIN -76.9%** (256-deep chain -- the same
370
+ architectural weak spot the honest framing has always named; recursive
371
+ JS-stack computed resolution loses to alien's flatter chain on hot new
372
+ cores by a wider margin than on old Intel). Speed wins vs alien: **3/6**;
373
+ heap wins: **5/6** with the sixth being a shared-zero on BROADCAST.
374
+ - **Microscope heap (the actual story):** on every shape where GC pressure
375
+ exists at all, lite allocates **one to four orders of magnitude less
376
+ transient heap than alien** -- DEEP CHAIN 0.5 KB vs 1062 KB (>2000x, on
377
+ the shape lite loses on time), MUX 0 KB vs 781 KB, KAIROS 23 KB vs 802 KB
378
+ (34.8x), DYNAMIC DAG 3.1 MB vs 60.7 MB (19.5x), SELECTIVE DAG 7.7 MB vs
379
+ 78.0 MB (10.2x). Against preact-signals and solid-signals the heap gap is
380
+ even wider on the fan-in / fan-out family; solid allocates ~17 MB on MUX
381
+ and ~15 MB on SELECTIVE DAG where lite allocates 0 KB and 7.7 MB on the
382
+ same shapes. The differentiated position is ALLOCATION, not raw
383
+ propagation speed -- competitive-to-winning throughput with dramatically
384
+ lower GC pressure, and that is the headline that reproduces across hosts.
385
+ - **Mirror sweep (r.txt):** Andrii's canonical 47-shape suite re-run
386
+ isolated-per-row lite vs alien on M4 Pro reproduces the same honest
387
+ framing: lite runs **parity-to-behind alien on throughput** across the
388
+ suite (wins outright on 4/47 -- `1000x5 - 25 sources (wide dense)` +12%,
389
+ `manySourcesIntoOneComputedEffectWithDirect` +32.5%,
390
+ `manySourcesIntoOneComputedEffect` +31.7%, and `createComputations4to1`
391
+ +19.3%), weak on the deep/layered-burst family. Every row carries a
392
+ `#STAMP` and the counters (`nodesRecomputed` / `edgesTraversed` /
393
+ `sinkReads`) match Andrii's published suite exactly (`mirror.mjs
394
+ --self-verify`), so a lite-vs-alien delta here is identical work, not DCE.
395
+ - **Andrii Volynets js-reactivity-benchmark position holds at 4th of 15**
396
+ with geomean **79.3ms** (raw log `bench/AndriiVolynetsReactiveBench.log`,
397
+ Andrii's own host); lite is ahead of 5th-place Preact Signals (99.8) by
398
+ ~21%. Top-3 count: **25/47** (up from 23 on 1.4.0);
399
+ outright-fastest-of-15 wins fluctuate at the top of a very tight
400
+ leaderboard where alien-signals / reflex / lite trade sub-percent margins
401
+ per shape (5 on 1.4.0, **2 on 1.5.0-beta** -- `createComputations4to1`
402
+ and `1000x5 - 25 sources (wide dense)`), plus 9 second-place finishes.
403
+ The stable metric across every published sweep is the geomean rank at #4
404
+ of 15.
405
+ - **Third-party version bumps** used in the local head-to-head vs 1.4.0:
406
+ alien-signals 3.1.2 -> 3.2.1, @preact/signals-core 1.14.1 -> 1.14.2,
407
+ @vue/reactivity 3.5.13 -> 3.5.35, solid-js 1.9.12 -> 1.9.13. Any
408
+ within-lib delta between the two sweeps reflects those bumps + the
409
+ Intel -> M4 Pro host change, not lite-signal changes: 1.4.0 -> 1.5.0
410
+ hot-path bytes are byte-identical (1.5.0 adds only the non-callable box
411
+ handle shape, which affects construction cost and handle ergonomics but
412
+ not the pooled-node read/write path).
387
413
 
388
414
  ## [1.4.0] -- 2026-06-XX
389
415
 
package/README.md CHANGED
@@ -723,27 +723,24 @@ These are the questions you'd ask in a code review, with the answers:
723
723
 
724
724
  ## Benchmarks
725
725
 
726
- Honest numbers, against the same workload, with anti-DCE sinks and verified effect execution. All measurements: Node 22, **2016-era Intel MacBook Pro (4 cores, ~10 yr old hardware)**, **one engine per cold process**, median across reps. Newer/faster machines shift all libs up proportionally; the relative ordering between libs is what matters. Numbers below are the **fresh 1.5.0-beta bench sweep** (default `prealloc: "eager"`) vs alien-signals on the same `benchmark.mjs` loop -- the harness reports **median execution time + transient heap** rather than ops/s. 1.5.0's hot paths are byte-identical to 1.4.0 (1.4.0 added three `stats()` counters on existing acquire/dispose/pool-grow edges; 1.5.0 adds the `signalBox` / `computedBox` non-callable handle shape -- cheaper CONSTRUCTION, same pooled-node read/write path -- and `createRoot`, an ownership escape hatch not on the hot path), so steady-state throughput tracks the 1.4.0 measurement within run-to-run noise on this old host. The third-party engine versions used in this sweep bumped from the 1.4.0 sweep (alien-signals 3.1.2 -> 3.2.1, @preact/signals-core 1.14.1 -> 1.14.2, @vue/reactivity 3.5.13 -> 3.5.35, solid-js 1.9.12 -> 1.9.13), so any within-lib delta between the two sweeps reflects those bumps + host noise, not lite-signal changes. Full per-engine tables: [`results.txt`](bench/results.txt) (this propagation suite) and [`resultsReactive.txt`](bench/resultsReactive.txt) (the cross-framework reactivity suite). The 10 raw reactive-suite runs are checked into [`bench/bench-runs-reactive/`](./bench/bench-runs-reactive/) so anyone can re-median them independently.
726
+ Honest numbers, against the same workload, with anti-DCE sinks and verified effect execution. All measurements: **Node 26.3.1, Apple M4 Pro (darwin/arm64)**, **one engine per cold process**, median across reps, machine-stamped `#STAMP` (engine + harness sha256, live registry config, host, node) on every output. Newer/faster machines shift all libs up proportionally; the relative ordering between libs is what matters -- and on this newer silicon the run-to-run noise floor is lower, so the sub-percent parity band tightens and the honest wins/losses stand out cleanly. Numbers below are the **fresh 1.5.0-beta bench sweep** on the v3 **microscope** (`benchmark.mjs`, six first-party shapes, default `prealloc: "eager"`) vs alien-signals -- the harness reports **median execution time + transient heap** rather than ops/s. 1.5.0's hot paths are byte-identical to 1.4.0 (1.4.0 added three `stats()` counters on existing acquire/dispose/pool-grow edges; 1.5.0 adds the `signalBox` / `computedBox` non-callable handle shape -- cheaper CONSTRUCTION, same pooled-node read/write path -- and `createRoot`, an ownership escape hatch not on the hot path), so steady-state throughput reflects the same engine bytes the 1.4.0 sweep measured; the deltas below are the M4 Pro / Node 26 machine speaking, plus the third-party version bumps since the 1.4.0 sweep (alien-signals 3.1.2 -> 3.2.1, @preact/signals-core 1.14.1 -> 1.14.2, @vue/reactivity 3.5.13 -> 3.5.35, solid-js 1.9.12 -> 1.9.13). Full outputs: [`bench/rb.txt`](bench/rb.txt) (this microscope aggregate across four engines) and [`bench/r.txt`](bench/r.txt) (the mirror sweep -- Andrii's canonical adapter verbatim, 47 rows, lite vs alien on the same M4 Pro host).
727
727
 
728
728
  | Scenario | What it stresses | lite-signal | alien-signals | lite vs alien | transient heap (lite / alien) |
729
729
  | ---------- | -------------------------------- | ----------- | ------------- | ------------- | ----------------------------- |
730
- | **SELECTIVE DAG** | sqrt-layered, set churn, 2 read/iter | **4757 ms** | 9166 ms | **+48% faster** | **1.7 MB / 31 MB** (18x less) |
731
- | **DYNAMIC DAG** | sqrt-layered, FAN=6, read flips each iter | **9630 ms** | 17375 ms | **+45% faster** | **4.3 MB / 26 MB** (6.0x less) |
732
- | **MUX** | 256 signals -> 1 sum -> 1 effect (fan-in) | **67 ms** | 101 ms | **+33% faster** | **38 KB / 3.9 MB** (104x less) |
733
- | **SMALL SELECTIVE** | 6 layers × 64 wide, 6 cand / 3 read | **1940 ms** | 2745 ms | **+29% faster** | **0.3 KB / 25.9 MB** (>=25872x less) |
734
- | **LARGE WEB APP** | 12 layers × ~80 wide, conditional reads | **2800 ms** | 2845 ms | **+2% faster** | **0.3 KB / 41 KB** (41x less) |
735
- | **WIDE DENSE** | 5 layers × ~200 wide, dense fan-in | 2870 ms | 2719 ms | -6% (parity) | **0.3 KB / 11.6 MB** (>=11605x less) |
736
- | **KAIROS** | 1 signal -> 1000 computeds -> 1 effect | 1418 ms | 1327 ms | -7% (parity) | 178 KB / 1.0 MB (5.9x less) |
737
- | **BROADCAST** | 1 signal -> 1000 effects (fan-out) | 1210 ms | 1084 ms | -12% | 72 KB / 21 KB |
738
- | **DEEP CHAIN** | 256-deep computed chain -> 1 effect | 398 ms | **349 ms** | -14% | 18 KB / 1.8 MB (96x less) |
730
+ | **MUX** | 256 signals -> 1 sum -> 1 effect (fan-in) | **22.52 ms** | 34.46 ms | **+34.6% faster** | **0 KB / 781 KB** (100% less) |
731
+ | **SELECTIVE DAG** | sqrt-layered, set churn, 2 read/iter | **1994 ms** | 2493 ms | **+20.0% faster** | **7.7 MB / 78.0 MB** (90.2% less, 10.2x) |
732
+ | **DYNAMIC DAG** | sqrt-layered, FAN=6, read flips each iter | **3601 ms** | 4415 ms | **+18.4% faster** | **3.1 MB / 60.7 MB** (94.9% less, 19.5x) |
733
+ | **BROADCAST** | 1 signal -> 1000 effects (fan-out) | 458.04 ms | 452.78 ms | -1.2% (parity) | ~0 KB / ~0 KB (both fit under GC floor) |
734
+ | **KAIROS** | 1 signal -> 1000 computeds -> 1 effect | 517.75 ms | 447.64 ms | -15.7% | **23 KB / 802 KB** (97.1% less, 34.8x) |
735
+ | **DEEP CHAIN** | 256-deep computed chain -> 1 effect | 170.89 ms | **96.59 ms** | -76.9% | **0.5 KB / 1062 KB** (100% less, >2000x) |
739
736
 
740
737
  *(lower time = faster; transient heap = average delta-heap per rep, lower = less GC pressure)*
741
738
 
742
- **Reading the table:** lite-signal's time wins cluster exactly where its zero-GC design pays off -- the **allocation-heavy dynamic shapes** (**SELECTIVE DAG +48%**, **DYNAMIC DAG +45%**, **SMALL SELECTIVE +29%**), where alien-signals churns the nursery and lite's object pool allocates near-nothing, plus **MUX +33%** (fan-in aggregation). These are the patterns that dominate live UI workloads under input churn: dashboards, scoreboards, HUDs, leaderboards. **LARGE WEB APP** flipped in lite's favor this sweep (+2%, from -3% on 1.4.0 -- alien 3.2.1 slightly slower on this shape than 3.1.2 was); on a ~2800ms base the sign of that parity result depends on the third-party version being measured against. On the cheap, low-allocation **stable** shapes (KAIROS, WIDE DENSE) lite runs at **parity** with alien -- within a 6-7% band inside this old host's run-to-run noise. The two losses are **BROADCAST (-12%)** (pure fan-out, no retracking for the pool to amortize) and **DEEP CHAIN (-14%)**: on a 256-deep computed pipeline alien's flatter representation still wins, though the gap narrowed considerably from -29% on the 1.4.0 sweep because alien-signals 3.2.1 got slower on the 256-deep shape than 3.1.2 was; lite's DEEP CHAIN barely moved between sweeps (395 -> 398ms).
739
+ **Reading the table:** the M4 Pro sweep clarifies exactly which of lite-signal's wins are real and which were noise on a slower host. The **allocation-heavy dynamic shapes stay lite's home turf**: **MUX +34.6%** (fan-in aggregation), **SELECTIVE DAG +20.0%**, and **DYNAMIC DAG +18.4%** -- the wins narrow versus the older Intel sweep (the fast machine has less GC pause to hide behind, so alien's raw propagation shows up more) but the ordering is intact, and these are the patterns that dominate live UI workloads under input churn: dashboards, scoreboards, HUDs, leaderboards. **BROADCAST is a true tie** on this host (-1.2%, both engines fit under the GC delta floor). The two losses tell a consistent story: **KAIROS -15.7%** (1000 computeds sharing a single source -- alien's flatter representation prices in the walk cheaper than lite's pooled-link graph on M4-class silicon) and **DEEP CHAIN -76.9%** (a 256-deep computed pipeline, the same architectural weak spot the honest framing has always named: recursive JS-stack computed resolution loses to alien's flatter chain on hot new cores by a wider margin than on old Intel). The mirror-sweep companion ([`bench/r.txt`](bench/r.txt)) reproduces the same picture across Andrii's 47 shapes: lite runs **parity-to-behind alien on throughput**, wins outright on 4 of the 47 (`1000x5 - 25 sources (wide dense)` +12%, both `manySourcesIntoOne*ComputedEffect` fan-ins ~+32%, and `createComputations4to1` +19%) -- and this is not the story to tell.
743
740
 
744
- On allocation pressure, `lite-signal` wins **8 of 9 scenarios** and is alone in the zero-alloc band: **~0.3 KB** of transient garbage on the stable app shapes (large web app, wide dense, small selective) across the whole run. The contrast is starkest on the dynamic DAGs -- lite allocates 1.7-4.3 MB (genuine retracking re-links) where alien-signals allocates 26-31 MB on the same shapes, and that allocation gap is the mechanism behind lite's +45-48% wins there once each engine is measured in isolation. On DEEP CHAIN, alien's transient heap moved from ~903 KB (with alien 3.1.2) to ~1.8 MB (with alien 3.2.1), further widening the heap gap to ~96x -- lite's 18 KB on the same shape is unchanged. The one scenario where lite allocates more is **BROADCAST** (72 KB vs alien's 21 KB), a pure fan-out with no retracking. `prealloc: "lazy"` trades a little extra first-construction allocation on the dynamic shapes for a smaller resident heap and faster cold start; the steady state is identical. preact and solid trail both engines on the dynamic shapes by 1-2 orders of magnitude on transient heap.
741
+ **The story is the heap column.** On every microscope shape where GC pressure exists at all, `lite-signal` allocates **one to four orders of magnitude less transient heap than alien-signals**: DEEP CHAIN 0.5 KB vs 1062 KB (>2000x less -- yes, on the shape where lite is behind on time), MUX 0 KB vs 781 KB, KAIROS 23 KB vs 802 KB (34.8x), DYNAMIC DAG 3.1 MB vs 60.7 MB (19.5x), SELECTIVE DAG 7.7 MB vs 78.0 MB (10.2x). On BROADCAST both engines are effectively zero. Against preact-signals and solid-signals the heap gap is even wider on the fan-in / fan-out family -- solid allocates ~17 MB on MUX and ~15 MB on SELECTIVE DAG where lite allocates 0 KB and 7.7 MB respectively (`bench/rb.txt`). **`lite-signal`'s differentiated position is ALLOCATION, not raw propagation speed**: competitive-to-winning throughput with dramatically lower GC pressure, not "fastest dynamic-graph engine". That headline is the one that reproduces across hosts, sweeps, and third-party version bumps -- because the object pool is the mechanism, not a tuning knob.
745
742
 
746
- > Note on the +70.8 KB retained that lite-signal shows on KAIROS specifically: that's the pre-allocated pool sitting in memory holding the live graph (1002 nodes + ~2000 links). The pool *is* the working memory -- see the [Case for object pooling](#case-for-object-pooling) section. On the other benches the graph is small enough that the same pool floats below baseline after GC.
743
+ > Note on the +23 KB delta-heap that lite-signal shows on KAIROS: that's the pre-allocated pool sitting in memory holding the live graph (1002 nodes + ~2000 links). The pool *is* the working memory -- see the [Case for object pooling](#case-for-object-pooling) section. On the other shapes the graph is small enough that the same pool floats below the GC baseline.
747
744
 
748
745
  The benchmark harness is in [`bench/benchmark.mjs`](./bench/benchmark.mjs); a full methodology write-up -- including the anti-DCE design, workload diagrams, variance discipline, reproducibility recipe, and a self-validation procedure for the harness itself -- lives in [`bench/README.md`](./bench/README.md). It:
749
746
 
@@ -817,7 +814,7 @@ npm run test:gc
817
814
 
818
815
  ### Tier 3 -- Performance (comparative benchmark)
819
816
 
820
- `npm run bench` runs the **microscope** -- lite's recommended eager config on six first-party shapes (`bench/results.txt`). Cross-framework standing comes from the **mirror** (`node --expose-gc bench/mirror.mjs --self-verify` then `bench/sweep.mjs`), which runs Andrii's canonical adapter verbatim so rows diff 1:1 against his log. Every output carries a machine-generated `#STAMP` (engine + harness sha256, the live registry config, host, node), so a header can never disagree with the code that ran. The pre-v3 five-framework reactivity suite is retained one release as `bench-reactive-legacy` (**deprecated -- removed after 1.5.1**). Full methodology: [`bench/README.md`](./bench/README.md).
817
+ `npm run bench` runs the **microscope** -- lite's recommended eager config on six first-party shapes; the aggregate output is [`bench/rb.txt`](bench/rb.txt) (four engines: lite, alien, preact, solid). Cross-framework standing comes from the **mirror** (`node --expose-gc bench/mirror.mjs --self-verify` then `bench/sweep.mjs`), which runs Andrii's canonical adapter verbatim so rows diff 1:1 against his log; the aggregate output is [`bench/r.txt`](bench/r.txt) (lite vs alien, all 47 shapes). Every output carries a machine-generated `#STAMP` (engine + harness sha256, the live registry config, host, node), so a header can never disagree with the code that ran. The pre-v3 five-framework reactivity suite is retained one release as `bench-reactive-legacy` (**deprecated -- removed after 1.5.1**). Full methodology: [`bench/README.md`](./bench/README.md).
821
818
 
822
819
  ```bash
823
820
  npm run bench
@@ -971,30 +968,34 @@ In stable environments (game engines, particle systems, visualizers), `lite-sign
971
968
  | **1000x5 (25 sources, wide/dense)** | 304ms | 303ms | 1746ms |
972
969
  | **64x6 (selective dynamic DAG)** | 181ms | 196ms | 559ms |
973
970
 
974
- *1.5.0-beta (default eager) on the local harness (slow 2016 MacBook, one engine per cold process -- compare within-column, lite vs alien; the approximating scenarios from `bench/benchmark.mjs`):*
971
+ *1.5.0-beta (default eager) on the v3 microscope (`bench/rb.txt`, Apple M4 Pro darwin/arm64, Node 26.3.1, one engine per cold process -- compare within-column, lite vs alien):*
975
972
  | Scenario | alien-signals | lite-signal (1.5.0-beta) | result |
976
973
  | :--- | :--- | :--- | :--- |
977
- | **SELECTIVE DAG** (sqrt-layered, set churn) | 9166ms | 4757ms | **lite +48%** |
978
- | **DYNAMIC DAG** (sqrt-layered, FAN=6) | 17375ms | 9630ms | **lite +45%** |
979
- | **SMALL SELECTIVE** (~ 64x6) | 2745ms | 1940ms | **lite +29%** |
980
- | **LARGE WEB APP** (~ 1000x12) | 2845ms | 2800ms | **lite +2%** (flipped from -3% on 1.4.0) |
981
- | **WIDE DENSE** (~ 1000x5) | 2719ms | 2870ms | alien +6% |
982
-
983
- > **Honest note (1.5.0-beta isolated run):** measured one-engine-per-process, lite-signal's
984
- > big wins are still on the **allocation-heavy** dynamic shapes (SELECTIVE DAG +48%, DYNAMIC
985
- > DAG +45%, SMALL SELECTIVE +29%) -- exactly where alien churns the nursery and lite's pool
986
- > allocates near-nothing. **LARGE WEB APP flipped into a small lite win this sweep** (+2%,
987
- > from -3% on 1.4.0), attributable to the alien-signals 3.1.2 -> 3.2.1 bump between sweeps;
988
- > on a ~2800ms base the sign of that parity result depends on which third-party version is
989
- > in the other column. 1.5.0's hot paths are byte-identical to 1.4.0 (1.5.0 adds the
990
- > `signalBox` / `computedBox` non-callable handle plus `createRoot`, none of which move
991
- > steady-state throughput), so these match the 1.4.0 isolated numbers within noise -- not
992
- > engine changes. lite remains the only zero-alloc library on every stable scenario
993
- > (see [`results.txt`](bench/results.txt)).
994
-
995
- The cross-framework reactivity suite agrees independently, re-run on **1.5.0-beta** (default eager, median-of-10, isolated): lite-signal is the **fastest of five frameworks on all five `dyn` rows** -- `dyn: large web app` **539ms** (+9% vs alien-signals' 593ms) and `dyn: wide dense` **874ms** (+6% vs 932ms), plus simple component (+19%), dynamic component (+16%), and deep (+12%) -- with preact 6-19x slower and vue 15-32x slower on the app-shaped graphs (see [`resultsReactive.txt`](bench/resultsReactive.txt); the 10 raw runs are checked into [`bench/bench-runs-reactive/`](./bench/bench-runs-reactive/)). **Lite now leads alien on all 7 `S: updateComputations` micro-rows** as well this sweep (was 4/7 on 1.4.0) -- +3% / +6% / +3% / +12% / +3% / +2% / +8% across the family, with the exact per-row numbers in `resultsReactive.txt`. The retracking is verified correct by `retracking.difftest.mjs` -- 20,000 direct + 10,000 batched writes, 0 disagreements against the **published 1.1.5** reference (re-pinned for v1.2).
996
-
997
- **The Takeaway:** as of 1.1.4 you no longer have to choose, and 1.5.0-beta holds the line -- the engine still ranks **4th of 15** on the official js-reactivity-benchmark (the only zero-GC library in the field). `lite-signal` keeps the zero-GC, flat-arena profile for 120fps Canvas/WebGL **and** wins decisively on the high-churn dynamic and fan-in topologies that dominate live UI -- the shapes where zero allocation pays off most. LARGE WEB APP flipped into a small lite win this sweep after the alien-signals 3.2.1 bump; it runs at parity with alien on the other cheap stable shapes. The one shape where alien's flatter representation still leads is the 256-deep computed pipeline (DEEP CHAIN, -14% on the 1.5.0-beta isolated run -- the gap narrowed from -29% on 1.4.0, again because alien 3.2.1 got slower on that specific shape, not because lite improved).
974
+ | **MUX** (256 sigs -> sum -> effect) | 34.46 ms | 22.52 ms | **lite +34.6%** |
975
+ | **SELECTIVE DAG** (sqrt-layered, set churn) | 2493 ms | 1994 ms | **lite +20.0%** |
976
+ | **DYNAMIC DAG** (sqrt-layered, FAN=6) | 4415 ms | 3601 ms | **lite +18.4%** |
977
+ | **BROADCAST** (1 -> 1000 effects) | 452.78 ms | 458.04 ms | tie (-1.2%, both under GC floor) |
978
+ | **KAIROS** (1 -> 1000 computeds) | 447.64 ms | 517.75 ms | alien +15.7% |
979
+ | **DEEP CHAIN** (256-deep -> effect) | 96.59 ms | 170.89 ms | alien +76.9% |
980
+
981
+ > **Honest note (1.5.0-beta on M4 Pro):** measured one-engine-per-process, lite-signal's
982
+ > wins cluster on the **allocation-heavy** dynamic shapes (MUX +34.6%, SELECTIVE DAG
983
+ > +20.0%, DYNAMIC DAG +18.4%) -- exactly where alien churns the nursery and lite's pool
984
+ > allocates near-nothing. The wins narrow versus the older Intel MacBook sweep (fast
985
+ > machine has less GC pause to hide behind, so alien's raw propagation surfaces more)
986
+ > but the ordering is intact. BROADCAST is a true tie on this host. Alien ahead on
987
+ > KAIROS -15.7% (1000 shared-source computeds -- alien's flatter representation prices
988
+ > in the walk cheaper on M4-class silicon) and DEEP CHAIN -76.9% (the same architectural
989
+ > weak spot the honest framing has always named). 1.5.0's hot paths are byte-identical
990
+ > to 1.4.0 (1.5.0 adds the `signalBox` / `computedBox` non-callable handle plus
991
+ > `createRoot`, none of which move steady-state throughput), so the deltas here are the
992
+ > M4 Pro / Node 26 host speaking, plus the third-party version bumps -- not engine
993
+ > changes. lite remains one to four orders of magnitude below alien on transient heap
994
+ > on every shape where GC pressure exists at all (see [`bench/rb.txt`](bench/rb.txt)).
995
+
996
+ The mirror sweep ([`bench/r.txt`](bench/r.txt), Andrii's canonical adapter verbatim, isolated-per-row, 10 reps, lite vs alien across all 47 shapes on the same M4 Pro host) reproduces the same picture: lite runs **parity-to-behind alien on throughput**, wins outright on 4/47 (`1000x5 - 25 sources (wide dense)` +12%, both `manySourcesIntoOne*ComputedEffect` fan-ins ~+32%, and `createComputations4to1` +19%), weak on the deep/layered-burst family. Every row carries a `#STAMP` and the counters (`nodesRecomputed` / `edgesTraversed` / `sinkReads`) match Andrii's published suite exactly, so a lite-vs-alien delta here is identical work, not DCE. The retracking is verified correct by `retracking.difftest.mjs` -- 20,000 direct + 10,000 batched writes, 0 disagreements against the **published 1.1.5** reference (re-pinned for v1.2).
997
+
998
+ **The Takeaway:** as of 1.1.4 you no longer have to choose, and 1.5.0-beta holds the line -- the engine still ranks **4th of 15** on the official js-reactivity-benchmark (the only zero-GC library in the field). `lite-signal` keeps the zero-GC, flat-arena profile for 120fps Canvas/WebGL **and** wins decisively on the high-churn dynamic and fan-in topologies that dominate live UI -- the shapes where zero allocation pays off most. On the M4 Pro sweep the win margins narrow on the dynamic shapes (SELECTIVE DAG +20%, DYNAMIC DAG +18%, MUX +34.6%) because the fast machine has less GC pause to hide behind; the ordering is intact and the heap column is the story that reproduces everywhere. The one shape where alien's flatter representation still leads decisively is the 256-deep computed pipeline (DEEP CHAIN -76.9% on the M4 Pro isolated run -- the gap widened from -14% on the older Intel sweep because recursive JS-stack computed resolution loses to alien's flatter chain on hot new cores by a wider margin than on old Intel; lite's allocation on DEEP CHAIN is 0.5 KB vs alien's 1062 KB, >2000x less transient heap on the same shape).
998
999
 
999
1000
  ### Roadmap
1000
1001
  - **1.1.5** -- additions in service of `lite-devtools` (node identity/traversability on the introspection walkers, for full auto-discovered graph rendering). *Shipped.*
@@ -1252,7 +1253,7 @@ Yes, if your computeFn reads its deps in the same order each invocation. The `cu
1252
1253
  ```bash
1253
1254
  npm test # behavior suite, ~1.3s
1254
1255
  npm run test:gc # zero-gc suite, requires --expose-gc, ~3s
1255
- npm run bench # comparative benchmark vs alien-signals (results.txt), ~5min
1256
+ npm run bench # microscope + mirror comparative benches (rb.txt / r.txt), ~5min
1256
1257
  node --expose-gc bench/benchmarkReactive.mjs # DEPRECATED pre-v3 reactivity suite (removed after 1.5.1)
1257
1258
  npm run harness:field # verify + cold-child A/B bench (fieldkit)
1258
1259
  npm run harness:all # field + dispose + churn probes, in sequence
package/llms.txt CHANGED
@@ -578,51 +578,58 @@ None of these touch the reactive engine -- no `FLAG_WATCHER` on `ReactiveNode`,
578
578
 
579
579
  The deliberate engineering for `watch`'s "0 per fire" is the hoisted `untrackedFire` closure with `currentNewValue` shared mutable state -- see source comment in `watch.js`. Inline arrow function inside the effect body would allocate per fire and break the zero-GC contract.
580
580
 
581
- ## Benchmark snapshot (Node 22, 2016-era Intel MacBook Pro, default eager, median across reps -- @1.5.0-beta.0)
581
+ ## Benchmark snapshot (Node 26.3.1, Apple M4 Pro darwin/arm64, default eager, median across reps -- @1.5.0-beta.0)
582
582
 
583
- `benchmark.mjs` head-to-head vs alien-signals on app-shaped scenarios (time = median
584
- execution; heap = average transient delta-heap per rep; lite-signal numbers are
585
- @1.5.0-beta.0, hot paths byte-identical to 1.4.0 -- 1.5.0 adds only the
583
+ v3 microscope (`benchmark.mjs`, six first-party shapes) head-to-head vs alien-signals
584
+ (time = median execution; heap = average transient delta-heap per rep; lite-signal
585
+ numbers are @1.5.0-beta.0, hot paths byte-identical to 1.4.0 -- 1.5.0 adds only the
586
586
  `signalBox` / `computedBox` non-callable handle and `createRoot`, neither on the
587
587
  steady-state read/write path; third-party engines bumped since 1.4.0 sweep --
588
- alien-signals 3.1.2 -> 3.2.1 in particular):
588
+ alien-signals 3.1.2 -> 3.2.1 in particular; host changed from 2016 Intel MacBook /
589
+ Node 22 to Apple M4 Pro / Node 26, which lowers the run-to-run noise floor):
589
590
 
590
591
  | Scenario | lite vs alien (time) | transient heap (lite / alien) |
591
592
  | -------------------------------- | -------------------- | ----------------------------- |
592
- | SELECTIVE DAG (set churn) | **+48% faster** | 1.7 MB / 31 MB |
593
- | DYNAMIC DAG (FAN=6, read flips) | **+45% faster** | 4.3 MB / 26 MB |
594
- | MUX (256 sigs -> sum -> effect) | **+33% faster** | 38 KB / 3.9 MB |
595
- | SMALL SELECTIVE (~64x6) | **+29% faster** | 0.3 KB / 25.9 MB |
596
- | LARGE WEB APP (~1000x12) | **+2% faster** | 0.3 KB / 41 KB |
597
- | WIDE DENSE (~1000x5) | -6% (parity) | 0.3 KB / 11.6 MB |
598
- | KAIROS (1 -> 1000 computeds) | -7% (parity) | 178 KB / 1.0 MB |
599
- | BROADCAST (1 -> 1000 effects) | -12% | 72 KB / 21 KB |
600
- | DEEP CHAIN (256-deep -> effect) | -14% | 18 KB / 1.8 MB |
601
-
602
- lite-signal's time wins are the allocation-heavy dynamic shapes (object pool allocates
603
- near-nothing; alien churns the nursery), plus MUX fan-in aggregation -- the patterns
604
- that dominate live UI under input churn. LARGE WEB APP flipped into a small lite win
605
- this sweep (+2%, was -3% on 1.4.0) after the alien 3.1.2 -> 3.2.1 bump. Parity on
606
- WIDE DENSE / KAIROS (within run-to-run noise on this old host). Two losses: BROADCAST
607
- (pure fan-out, no retracking for the pool to amortize) and DEEP CHAIN (alien's flatter
608
- representation still wins on long chains, though the gap narrowed from -29% on 1.4.0
609
- to -14% here -- alien 3.2.1 got slower on 256-deep, lite's DEEP CHAIN barely moved).
610
- On allocation, lite wins 8/9 scenarios and is alone in the zero-alloc band (~0.3 KB
611
- transient on the stable app shapes).
612
-
613
- The cross-framework reactivity suite (5 frameworks) re-run on 1.5.0-beta (default eager,
614
- median-of-10): lite-signal is fastest on all five `dyn:*` rows -- `dyn: large web app`
615
- 539ms (+9% vs alien-signals' 593ms), `dyn: wide dense` 874ms (+6% vs 932ms), plus
616
- simple component (+19%), dynamic component (+16%), deep (+12%) -- with preact 6-19x
617
- slower and vue 15-32x slower on the app-shaped graphs. On the `S: updateComputations`
618
- micro-rows **lite now leads alien on ALL 7 rows this sweep** (+3% / +6% / +3% / +12% /
619
- +3% / +2% / +8%; was 4/7 on 1.4.0). Retracking verified correct by
620
- `retracking.difftest.mjs` (20,000 direct + 10,000 batched writes, 0 disagreements vs
621
- published 1.1.5). `prealloc: "lazy"` trades a little first-construction allocation on the
622
- dynamic shapes for a smaller resident heap and faster cold start; steady state identical.
593
+ | MUX (256 sigs -> sum -> effect) | **+34.6% faster** | 0 KB / 781 KB (100% less) |
594
+ | SELECTIVE DAG (set churn) | **+20.0% faster** | 7.7 MB / 78.0 MB (10.2x) |
595
+ | DYNAMIC DAG (FAN=6, read flips) | **+18.4% faster** | 3.1 MB / 60.7 MB (19.5x) |
596
+ | BROADCAST (1 -> 1000 effects) | -1.2% (parity) | ~0 KB / ~0 KB (both zero) |
597
+ | KAIROS (1 -> 1000 computeds) | -15.7% | 23 KB / 802 KB (34.8x) |
598
+ | DEEP CHAIN (256-deep -> effect) | -76.9% | 0.5 KB / 1062 KB (>2000x) |
599
+
600
+ lite-signal's time wins on the M4 Pro sweep cluster on the allocation-heavy dynamic
601
+ shapes (object pool allocates near-nothing; alien churns the nursery), plus MUX fan-in
602
+ aggregation -- the patterns that dominate live UI under input churn. The wins narrow
603
+ versus the older Intel sweep (fast machine has less GC pause to hide behind, so
604
+ alien's raw propagation surfaces more) but the ordering is intact. BROADCAST is a true
605
+ tie on this host (both under the GC delta floor). Two losses: KAIROS -15.7%
606
+ (1000 shared-source computeds -- alien's flatter representation prices in the walk
607
+ cheaper on M4-class silicon) and DEEP CHAIN -76.9% (the same architectural weak spot
608
+ the honest framing has always named; recursive JS-stack computed resolution loses to
609
+ alien's flatter chain on hot new cores by a wider margin than on old Intel). On
610
+ allocation, lite wins 5/6 shapes and is one to four orders of magnitude below alien on
611
+ every shape where GC pressure exists at all.
612
+
613
+ **The differentiated position is ALLOCATION, not raw propagation speed** -- competitive
614
+ throughput with dramatically lower GC pressure, not "fastest dynamic-graph engine".
615
+ That headline reproduces across hosts, sweeps, and third-party version bumps because
616
+ the object pool is the mechanism, not a tuning knob.
617
+
618
+ Mirror sweep (`bench/r.txt`, Andrii's canonical adapter verbatim, isolated-per-row,
619
+ 10 reps, lite vs alien only on the same M4 Pro host) reproduces the same picture
620
+ across all 47 shapes: lite runs parity-to-behind alien on throughput, wins outright
621
+ on 4/47 (`1000x5 - 25 sources (wide dense)` +12%,
622
+ `manySourcesIntoOneComputedEffectWithDirect` +32.5%, `manySourcesIntoOneComputedEffect`
623
+ +31.7%, and `createComputations4to1` +19.3%), weak on the deep/layered-burst family.
624
+ Every row carries a `#STAMP` and the counters (`nodesRecomputed` / `edgesTraversed` /
625
+ `sinkReads`) match Andrii's published suite exactly, so a lite-vs-alien delta here is
626
+ identical work, not DCE. Retracking verified correct by `retracking.difftest.mjs`
627
+ (20,000 direct + 10,000 batched writes, 0 disagreements vs published 1.1.5).
628
+ `prealloc: "lazy"` trades a little first-construction allocation on the dynamic shapes
629
+ for a smaller resident heap and faster cold start; steady state identical.
623
630
 
624
631
  Retained heap after forced GC: typically negative for all libs (V8 compacts).
625
- The one exception: lite-signal shows ~+71 KB retained on KAIROS, which is the
632
+ The one exception: lite-signal shows ~+23 KB retained on KAIROS, which is the
626
633
  pre-allocated pool holding the live 1002-node graph in steady state. This is
627
634
  the design: the pool IS the working memory. Not a leak.
628
635
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zakkster/lite-signal",
3
- "version": "1.5.0-beta.6",
3
+ "version": "1.5.0-beta.7",
4
4
  "description": "Zero-GC reactive graph. Monomorphic object pool, versioned push-pull propagation, 32-bit modular versioning. Built for hot paths and long-running processes.",
5
5
  "author": "Zahary Shinikchiev <shinikchiev@yahoo.com>",
6
6
  "license": "MIT",