Performance Benchmarks

Real measured performance data from the What Framework test suite. All benchmarks run on Node.js v22.23.2.

Last updated · v0.13.4 · linux

Signals

Operation Ops/Second Time per Op
Signal create 2.0M ops/sec 0.5µs
Signal read (100x per iteration) 1.6M ops/sec 0.6µs
Signal write (no subscribers) 853K ops/sec 0.0012ms
Signal write (1 subscriber) 305K ops/sec 0.0033ms
Signal write (10 subscribers) 132K ops/sec 0.0076ms
Signal peek (untracked read) 1.6M ops/sec 0.6µs

Subscriber overhead is expected — effects run on every write.

Computed Values

Operation Ops/Second Time per Op
Computed create + read 479K ops/sec 0.0021ms
Computed chain (depth 5) 125K ops/sec 0.0080ms
Computed diamond dependency 245K ops/sec 0.0041ms

Effects

Operation Ops/Second Time per Op
Effect create + dispose 1.5M ops/sec 0.7µs
Effect with 10 signal deps 437K ops/sec 0.0023ms

Batching

Operation Ops/Second Time per Op
Batch 100 writes, 1 effect 247K ops/sec 0.0040ms
Batch 10 signals, 10 writes each 197K ops/sec 0.0051ms

Batching prevents intermediate computations, making 100 writes nearly as fast as 1.

Rendering (h function)

Operation Ops/Second Time per Op
Single element creation 4.5M ops/sec 0.2µs
Nested (3 levels) 2.2M ops/sec 0.5µs
List of 100 items 33K ops/sec 0.0303ms
Component call 9.0M ops/sec 0.1µs

Server-Side Rendering

Operation Ops/Second Time per Op
SSR simple element 326K ops/sec 0.0031ms
SSR nested tree 193K ops/sec 0.0052ms
SSR list of 100 items 7K ops/sec 0.1513ms
SSR component tree (50 items) 20K ops/sec 0.0490ms

Bundle Size

Package Size (gzipped)
what-framework (core) ~6.40 KB

Measured using gzip -9 compression.

Methodology

All benchmarks run on Node.js v22.23.2 with the following approach:

Warmup: 100–1000 iterations discarded before measurement

Iterations: 500–10,000 per test (varies by operation cost)

Timing: High-resolution performance.now()

Calculation: Trimmed mean (discard top/bottom 10%)

Environment: linux, Node.js v22.23.2

Automated: Benchmarks regenerate every 3 days via CI

Source code available in /benchmark directory. Run with npm run bench.