Benchmarks · Chrome 158 & WebKit 26.5 · Official krausest PR #2181
Benchmarks & Trade-Offs
Therapy.jl sends static HTML immediately for everything on the page and compiles only interactive @island widgets from pure Julia to WebAssembly (WasmGC) so controls wire up in the background. Below are complete measurements from the official krausest/js-framework-benchmark (PR #2181) runner on Chrome 158, 10,000-row total browser memory accounting, 1-to-10 multi-island scaling alongside Astro 5 and Qwik 1.12, and cross-browser verification on WebKit 26.5 (Safari), plus the exact workloads where other frameworks beat Therapy.jl today.
Official Keyed Speed
1.09x
Official krausest weighted CPU geomean in Chrome 158 (VanillaJS 1.04x, SolidJS 1.13x, Svelte 1.14x, NetWasm 1.15x, Vue 1.24x, Leptos 1.26x, React 1.41x).
Total Browser Memory
1.02x
Official measureUserAgentSpecificMemory geomean (2.33 MB at 1k rows, 13.34 to 13.45 MB at 10k rows including Blink DOM, matching VanillaJS at 2.31 / 13.21 MB).
Single-Island Page Size
3.25 KB
Total gzipped download for 40 static sections + 1 counter (2.9x smaller than Astro + Preact; flat 3.31 KB for 10 shared instances, crossover at 6 to 7 distinct islands).
Official Keyed Table Speed (krausest Chrome 158)
How fast can a web framework create, update, highlight, swap, append, and remove rows in a large HTML table? We submitted frameworks/keyed/therapy to krausest/js-framework-benchmark (PR #2181), passed upstream npm run rebuild-ci keyed/therapy (smoketest, strict keyed DOM identity isKeyed, and Content Security Policy checks), and ran the unmodified official webdriver-ts runner on Google Chrome 158.0.8127.108 (macOS arm64 Apple Silicon) with official CPU throttling (2x to 4x on fast clicks) and 15 runs per test (25 on row selection). Total Frame measures button click to painted pixels, while Framework Execution Time isolates the framework's own JavaScript or WebAssembly code running before Chrome lays out and paints the page. Every cell shows median ± IQR and its ratio relative to the fastest framework in that row (1.00x = fastest, lower is better).
Official Weighted Geometric Mean: Total Frame Duration
Lower is faster · Exact krausest webdriver-ts weights & throttling · Chrome 158
| Operation (ms) | vanillajs Hand-written JS | Therapy.jl v0.5.0 · WasmGC | SolidJS 1.9 Fine-grained JS | Svelte 5.42 Compiled JS | NetWasm UI v0.16 · C# Wasm | Vue 3.5 Virtual DOM JS | Leptos 0.7 Rust -> Wasm | React 19.2 Hooks VDOM |
|---|---|---|---|---|---|---|---|---|
Create 1,000 rows Initial table render (1x CPU) | 19.5 ±0.5(1.00x) | 20.0 ±0.4(1.03x) | 21.0 ±0.6(1.08x) | 21.1 ±0.4(1.08x) | 22.1 ±1.4(1.13x) | 23.3 ±0.5(1.19x) | 26.4 ±2.4(1.35x) | 24.6 ±1.0(1.26x) |
Replace 1,000 rows Swap all rows for new IDs (1x CPU) | 21.4 ±1.0(1.00x) | 22.0 ±0.9(1.03x) | 23.6 ±0.5(1.10x) | 24.4 ±0.6(1.14x) | 22.9 ±0.2(1.07x) | 26.6 ±2.6(1.24x) | 29.6 ±0.5(1.38x) | 28.3 ±1.1(1.32x) |
Update every 10th Mutate 100 labels in place (4x CPU) | 15.2 ±1.3(1.00x) | 16.2 ±3.0(1.07x) | 16.7 ±3.1(1.10x) | 16.2 ±2.5(1.07x) | 18.5 ±5.4(1.22x) | 18.7 ±2.7(1.23x) | 15.5 ±2.6(1.02x) | 21.0 ±2.3(1.38x) |
Select row Highlight 1 clicked row (4x CPU) | 8.8 ±5.2(1.87x) | 9.0 ±1.2(1.91x) | 9.3 ±0.9(1.98x) | 10.0 ±3.6(2.13x) | 9.2 ±2.4(1.96x) | 9.2 ±3.2(1.96x) | 4.7 ±1.3(1.00x) | 6.3 ±1.1(1.34x) |
Swap 2 rows Move existing <tr> nodes (4x CPU) | 13.4 ±1.2(1.00x) | 14.0 ±1.5(1.04x) | 15.2 ±0.5(1.13x) | 15.6 ±1.3(1.16x) | 14.7 ±0.9(1.10x) | 15.6 ±1.0(1.16x) | 14.1 ±1.2(1.05x) | 90.3 ±3.9(6.74x) |
Remove 1 row Delete single row (2x CPU) | 17.4 ±0.9(1.12x) | 17.2 ±1.1(1.11x) | 18.0 ±1.4(1.16x) | 18.0 ±2.2(1.16x) | 18.0 ±1.8(1.16x) | 18.9 ±6.9(1.22x) | 18.7 ±0.9(1.21x) | 15.5 ±5.4(1.00x) |
Create 10,000 rows Large table stress test (1x CPU) | 207.0 ±8.9(1.00x) | 221.6 ±15.5(1.07x) | 226.6 ±8.6(1.09x) | 227.1 ±9.0(1.10x) | 237.6 ±11.1(1.15x) | 247.3 ±9.2(1.19x) | 272.4 ±8.8(1.32x) | 344.7 ±9.2(1.67x) |
Append 1,000 rows Add rows to end of table (1x CPU) | 23.2 ±1.1(1.00x) | 25.1 ±2.6(1.08x) | 24.2 ±0.5(1.04x) | 25.0 ±1.5(1.08x) | 25.0 ±0.6(1.08x) | 26.5 ±0.2(1.14x) | 28.4 ±1.4(1.22x) | 27.9 ±0.5(1.20x) |
Clear all rows Empty the table (4x CPU) | 9.4 ±0.9(1.00x) | 10.1 ±1.0(1.07x) | 11.0 ±0.8(1.17x) | 10.7 ±0.6(1.14x) | 9.7 ±0.8(1.03x) | 12.5 ±0.8(1.33x) | 15.2 ±0.4(1.62x) | 16.5 ±1.2(1.76x) |
| Weighted GeoMean Official krausest score | 1.04x | 1.09x | 1.13x | 1.14x | 1.15x | 1.24x | 1.26x | 1.41x |
Official Memory (MB) ready / 1k / clear (UA) | 1.07 / 2.31 / 1.16(1.00x) | 1.11 / 2.33 / 1.20(1.02x) | 1.09 / 3.15 / 1.29(1.16x) | 1.09 / 3.33 / 1.43(1.22x) | 2.18 / 3.47 / 2.46(1.87x) | 1.35 / 4.43 / 1.58(1.49x) | 1.12 / 3.19 / 1.51(1.24x) | 1.64 / 4.89 / 2.43(1.90x) |
Compressed Size JS + Wasm transfer | 2.5 KB | 10.9 KB | 4.5 KB | 9.7 KB | 119.1 KB | 23.3 KB | 48.8 KB | 51.4 KB |
First Paint Cold startup (ms) | 49.1 ms | 76.7 ms | 38.3 ms | 41.6 ms | 468.1 ms | 100.3 ms | 249.5 ms | 204.0 ms |
How official krausest compliance works: keyed DOM identity, CSP, and Wasm notes
Strict keyed DOM identity: In a keyed list, each data item owns a specific browser <tr> element. Swapping two rows must move those existing <tr> nodes rather than overwriting text in place, updating every 10th label must leave untouched rows alone, and replacing 1,000 rows with new IDs must allocate fresh <tr> elements. Therapy.jl passed upstream isKeyed and checkCSP in PR #2181, and declares issue #1139 (pre-built .wasm artifact shipped in bundled-dist/, matching Leptos and NetWasm UI).
How Therapy.jl compares with NetWasm UI and Leptos: We included two other compiled WebAssembly frameworks from upstream krausest: NetWasm UI 0.16 (C# compiled to WebAssembly) and Leptos 0.7 (Rust compiled to linear-memory WebAssembly). Therapy.jl finished ahead of both on weighted frame speed (1.09x compared with 1.15x and 1.26x), official memory (1.02x compared with 1.87x and 1.24x), compressed bundle size (10.9 KB compared with 119.1 KB and 48.8 KB), and first paint (76.7 ms compared with 468.1 ms and 249.5 ms). Leptos 0.7 did win single-row selection (4.7 ms compared with 9.0 ms), and SolidJS and Svelte 5 both beat Therapy.jl on compressed size and first paint.
10,000-Row Total Browser Memory & Per-Row Ablation
Chrome's V8 heap counter (JSHeapUsedSize) counts JavaScript objects and WasmGC structs, but leaves out Blink's shared DOM layer and Rust's separate linear WebAssembly memory. To compare all frameworks on one apples-to-apples scale at 10,000 rows, we measured Chrome's cross-origin-isolated performance.measureUserAgentSpecificMemory() (the exact same API used by official krausest) alongside JSHeapUsedSize in Chrome 158. At 10,000 rows, Blink's DOM layer adds ~9.4 to 9.6 MB equally for every framework, and Therapy.jl's total browser memory (13.34 to 13.45 MB) stays right next to VanillaJS (13.21 MB) while saving 32% compared with Leptos (19.73 MB), 35% to 36% compared with SolidJS (20.72 MB) and Svelte 5 (21.10 MB), and 55% to 57% compared with Vue 3 (29.56 MB) and React 19 (31.56 MB). Both the default batched build and the general --no-batch per-row build perform nearly identically.
Total Browser Memory at 10,000 Rows (measureUserAgentSpecificMemory, MB)
Lower is better · Measures V8 JS + WasmGC + Blink DOM + Rust/C# linear Wasm memory together
| Framework | 1k Total UA | 10k V8 Heap | 10k Total UA | Clear Total UA | 10k Framework Time |
|---|---|---|---|---|---|
vanillajs Hand-written JS | 2.31 MB | 3.73 MB | 13.21 MB(1.00x) | 1.10 MB | 13.32 ms |
Therapy.jl Per-row (--no-batch) | 2.33 MB* | 3.96 MB | 13.34 MB(1.01x) | 1.29 MB | 14.21 ms |
Therapy.jl Default (batched) | 2.33 MB | 4.08 MB | 13.45 MB(1.02x) | 1.23 MB | 14.08 ms |
NetWasm UI v0.16 · C# Wasm | 3.47 MB | 4.60 MB | 14.15 MB(1.07x) | 2.46 MB | 23.32 ms |
Leptos 0.7 Rust linear Wasm | 3.19 MB | 9.00 MB | 19.73 MB(1.49x) | 1.74 MB | 56.14 ms |
SolidJS 1.9 Fine-grained JS | 3.15 MB | 11.17 MB | 20.72 MB(1.57x) | 1.29 MB | 20.33 ms |
Svelte 5.42 Compiled JS | 3.33 MB | 11.53 MB | 21.10 MB(1.60x) | 1.45 MB | 24.79 ms |
Vue 3.5 Virtual DOM JS | 4.43 MB | 19.98 MB | 29.56 MB(2.24x) | 1.65 MB | 38.4 ms† |
React 19.2 Hooks VDOM | 4.89 MB | 21.81 MB | 31.56 MB(2.39x) | 2.68 MB | 149.89 ms |
Notes: 1k Total UA values come from official krausest Chrome 158 runs (*Therapy --no-batch matched default 1k V8 heap at 2.05 MB). 10k V8 Heap, 10k Total UA, and Clear Total UA come from benchmarks/run_keyed_cdp.mjs in Chrome 158. †Vue 3 schedules 10k DOM work asynchronously across microtasks, so Vue's 10k Framework Time column reports the official krausest trace value (38.4 ms).
Page Size & Multi-Island Scaling (1 to 10 Islands)
Server-side rendering sends readable HTML right away while interactive islands wire up click handlers in the background. A single counter island favors Therapy.jl, while pages with many separate widgets favor frameworks that share one JavaScript runtime. To measure the exact crossover point, we built identical 40-section static pages (Cache-Control: no-store, 15 uncached Chrome 158 loads) with 1, 3, 5, and 10 distinct counter islands, plus a page with 10 reused instances of one Therapy.jl @island.
Total Gzipped Page Payload: 40 Static Sections + 1 Counter (plus 10 Shared)
Lower is smaller · Chrome 158 cold loads (n = 15) · benchmarks/results/ssr_islands.json
| Framework & Mode | 1 Island | 3 Islands | 5 Islands | 10 Islands | Per Added | 1-Island Ready | 1st Click |
|---|---|---|---|---|---|---|---|
Therapy.jl v0.5.0 Distinct @islands | 3.25 KB | 6.32 KB | 9.36 KB | 16.96 KB | +1.52 KB | 19.1 ± 3.7 ms | 42.3 ± 6.9 ms |
Therapy.jl v0.5.0 Shared @island instances | 3.25 KB | 3.27 KB | 3.28 KB | 3.31 KB | +0.01 KB | 21.0 ± 2.6 ms | 42.1 ± 4.0 ms |
Astro 5 + Preact client:load | 9.56 KB | 10.25 KB | 10.92 KB | 12.61 KB | +0.34 KB | 22.0 ± 1.4 ms | 38.9 ± 1.0 ms |
Astro 5 + SolidJS client:load | 10.09 KB | 10.82 KB | 11.54 KB | 13.34 KB | +0.36 KB | 21.4 ± 3.5 ms | 39.8 ± 5.4 ms |
Astro 5 + Svelte 5 client:load | 15.46 KB | 16.29 KB | 17.11 KB | 19.14 KB | +0.41 KB | 24.6 ± 6.6 ms | 38.1 ± 2.0 ms |
Qwik 1.12 Resumable SSR* | 23.92 KB | 24.03 KB | 24.13 KB | 24.36 KB | +0.05 KB | 22.9 ± 2.4 ms | 106.6 ± 28.8 ms |
Exact multi-island crossover, v0.5.0 shared runtime, and Qwik resumability
Measured crossover (6 to 7 distinct islands): In Therapy.jl v0.5.0, the 1-island page totals 3.25 KB gzipped (0.79 KB HTML + 0.97 KB shared runtime + 0.96 KB island loader + 0.53 KB .wasm). Each additional distinct island adds ~1.52 KB gzipped (0.96 KB loader + 0.53 KB .wasm), whereas Astro 5 adds only ~0.34 to 0.36 KB per island on Preact or SolidJS. As a result, Astro + Preact and Astro + SolidJS become smaller than Therapy.jl between 6 and 7 distinct islands (12.61 and 13.34 KB compared with 16.96 KB at 10 distinct islands). Therapy.jl stays smaller than Astro + Svelte 5 (19.14 KB) and Qwik 1.12 (24.36 KB*) through 10 distinct islands.
Reused islands stay flat: When a page mounts 10 independent instances of the same @island component (such as repeated buttons or cards), Therapy.jl downloads the .wasm and loader once and keeps total page size flat at 3.31 KB gzipped.
Qwik 1.12 resumability: Qwik skips startup work by serializing listener state into HTML (1.49 KB at 1 island) and prefetching its 22.43 KB core runtime in the background. Total transfer rises by only 0.05 KB per added island (23.92 to 24.36 KB*), though cold first-click latency was 106.6 to 131.2 ms in our uncached localhost run.
Cross-Browser WasmGC Verification (Chrome & WebKit / Safari)
To test beyond V8, we ran the keyed table suite across both Chromium 158 (V8) and WebKit 26.5 (Safari / JavaScriptCore) using an identical in-page timer (click through microtask flush and synchronous layout, 10 runs after 2 warmups, zero Playwright polling overhead). Therapy.jl v0.5.0 compiled and passed strict keyed <tr> DOM identity checks natively on both engines. On WebKit 26.5, Therapy.jl stayed right in the leading cluster alongside VanillaJS, SolidJS, and Svelte 5, beating Leptos on 1k create, 1k replace, 10k create, and clear, while VanillaJS and SolidJS edged slightly ahead on 10k create (740 and 729 ms compared with 773.5 ms). Headless Firefox could not launch inside our sandboxed macOS automation runner, so Firefox timing remains untested here and can be run locally with benchmarks/run_cross_browser.mjs.
| Framework (keyed verified) | Chrome 1k | Chrome Repl | Chrome Upd | Chrome 10k | WebKit 1k | WebKit Repl | WebKit Upd | WebKit 10k |
|---|---|---|---|---|---|---|---|---|
| Therapy.jl v0.5.0 | 22.65 ms | 19.75 ms | 2.15 ms | 215.0 ms | 55.5 ms | 51.5 ms | 3.0 ms | 773.5 ms |
| VanillaJS | 22.50 ms | 19.80 ms | 2.30 ms | 208.0 ms | 52.0 ms | 50.0 ms | 2.0 ms | 740.0 ms |
| SolidJS 1.9 | 24.00 ms | 21.10 ms | 2.00 ms | 227.0 ms | 53.0 ms | 53.0 ms | 2.0 ms | 729.0 ms |
| Svelte 5.42 | 27.05 ms | 23.55 ms | 2.75 ms | 196.2 ms | 53.5 ms | 60.0 ms | 2.0 ms | 768.0 ms |
| Leptos 0.7 (Rust) | 33.60 ms | 29.70 ms | 2.55 ms | 240.7 ms | 61.0 ms | 62.0 ms | 3.0 ms | 803.0 ms |
Adversarial Stress Tests
Standard benchmarks only tell part of the story. We designed four targeted stress workloads specifically to test where WebAssembly string boundaries, binary data encoding, and compile-time static analysis struggle (Chromium 149, 15 trials, medians).
| Stress Workload | Peer Result | Therapy.jl Result | What Happened & Why |
|---|---|---|---|
| 1,000-row Emoji & Multibyte UTF-8 Churn | vanillajs: 0.49 ms CPU(12.30 ms total) | 0.51 ms CPU (12.45 ms total) | WasmTarget reuses a cached UTF-16 scratch buffer (_codeUnitsCache) with zero per-call Wasm array allocations, cutting Therapy.jl CPU time from 0.89 ms down to 0.51 ms (within 4% of hand-written UTF-16 VanillaJS). |
| 1,000-row Random Shuffle & Full Reverse | vanillajs: 7.52 / 7.40 mssolid: 7.87 / 7.56 ms | 8.07 / 7.83 ms total | Both VanillaJS and SolidJS finish slightly faster when nearly every row (940 to 999 DOM nodes) moves in a single frame. |
| Large Static vs Dynamic Reactive Graphs | solid: 1,000-node dynamic chain in 66.8 ms | Growable bitset lifts the old 64-effect cap (65- and 130-effect islands pass); runtime loops unsupported | Therapy.jl tracks dirty effects with a growable multi-word bitset so large static islands (Cap65Island, Cap130Island) compile cleanly, while SolidJS wins whenever signals must be created dynamically inside runtime loops. |
| Large Embedded Data (32,000-float table) | Pure JS: 274.7 KB gz (621.3 KB raw), 47.1 ms ready | WasmTarget: 240.4 KB gz (256.4 KB raw .wasm), 50.4 ms ready | WasmTarget stores constant numeric arrays in passive binary data segments (array.new_data) instead of initialization instructions, transferring 12.5% less compressed data than inline JavaScript numbers while starting 3.3 ms slower. |
Where Other Frameworks Beat Therapy
Every architecture makes trade-offs. Here are the concrete workloads where mature JavaScript and Rust frameworks outperform Therapy.jl today:
7+ Distinct Islands on One Page
Astro 5 with Preact or SolidJS crosses below Therapy.jl in total download size between 6 and 7 distinct islands (12.61 and 13.34 KB compared with 16.96 KB at 10 distinct islands) because Astro shares one JavaScript runtime across every island, whereas Therapy.jl currently ships a separate .wasm file and loader per distinct @island.
Table Bundle Size & First Paint
VanillaJS, SolidJS, and Svelte 5 all ship smaller bundles for the 10,000-row table (2.5, 4.5, and 9.7 KB compressed compared with 10.9 KB for Therapy.jl) and paint faster on cold startup (38.3 to 49.1 ms compared with 76.7 ms). Ahead-of-time Julia compilation also takes seconds per complex island.
Dynamic Runtime Reactive Graphs
Choose SolidJS, Svelte 5, Vue 3, or Leptos when your app creates hundreds or thousands of signals, memos, or subscriptions dynamically inside runtime loops. Therapy.jl compiles reactive graphs ahead of time, so island dependencies must be statically discoverable.
Full-List Shuffles & WebKit 10k Edge
VanillaJS and SolidJS stay slightly ahead when shuffling 1,000 existing DOM nodes in one frame (7.52 and 7.87 ms compared with 8.07 ms), edge slightly faster on WebKit 10k row creation (740 and 729 ms compared with 773.5 ms), and work on older browsers without requiring WasmGC and wasm:js-string.
Reproduce From Scratch
Every benchmark island, official krausest submission, multi-island SSR runner, cross-browser runner, raw JSON output, and permanent differential fuzzer lives directly in public GitHub repositories:
# 1. Build the keyed krausest benchmark island (default batched + per-row --no-batch)
julia --project=. benchmarks/krausest_island.jl
julia --project=. benchmarks/krausest_island.jl benchmarks/dist/krausest-perrow --no-batch
# 2. Verify all 9 keyed operations and strict <tr> DOM identity in Chromium
node benchmarks/verify_keyed_compliance.mjs benchmarks/dist/krausest
# 3. Run 10k total browser memory (measureUserAgentSpecificMemory) + ablation
node benchmarks/run_keyed_cdp.mjs --runs 10 --krausest-dir ../js-framework-benchmark
# 4. Run cross-browser verification (Chromium, WebKit, and Firefox locally)
node benchmarks/run_cross_browser.mjs --runs 10 --krausest-dir ../js-framework-benchmark
# 5. Run the 1/3/5/10 multi-island SSR scaling benchmark
julia --project=. benchmarks/ssr/build_therapy_ssr.jl
node benchmarks/run_ssr_islands.mjs --runs 15
# 6. Run the permanent differential fuzzer and adversarial island suites
julia --project=. -e 'using Pkg; Pkg.test()'The keyed table used in the benchmark requires zero manual DOM manipulation. Direct row.id captures inside click handlers automatically compile to a single delegated listener on <tbody>:
struct BenchRow
id::Int64
label::String
end
@island hydrate = :eager function KeyedTable()
rows, set_rows = create_signal(BenchRow[])
selected, set_selected = create_signal(Int64(0))
is_selected = create_selector(selected)
remove_row = (target_id::Int64) -> begin
cur = rows()
out = BenchRow[]
for r in cur
r.id == target_id || push!(out, r)
end
set_rows(out)
end
return Table(Tbody(
For(rows; key = r -> r.id) do row
Tr(
:class => BindClass(is_selected, row.id, "danger", ""),
Td(row.id),
Td(A(:on_click => () -> set_selected(row.id), row.label)),
Td(A(:on_click => () -> remove_row(row.id), "Remove")),
)
end,
))
endSource Files & Raw Results on GitHub
- krausest/js-framework-benchmark PR #2181: official upstream keyed/therapy submission passing rebuild-ci (smoketest, isKeyed, checkCSP).
- benchmarks/README.md: full reproduction guide and measurement methodology.
- benchmarks/krausest_island.jl: standalone keyed WebAssembly benchmark island and builder.
- benchmarks/run_keyed_cdp.mjs, run_ssr_islands.mjs, and run_cross_browser.mjs: Playwright benchmark harnesses for 10k total browser memory, 1/3/5/10 multi-island SSR scaling, and cross-browser verification.
- benchmarks/results/: raw JSON outputs for Chrome 158 official krausest, 10k CDP memory, multi-island SSR scaling, and Chromium/WebKit cross-browser runs.
- test/test_keyed_for_fuzz.jl & test/test_adversarial_islands.jl: permanent seeded differential fuzzer and adversarial island test suites.