Benchmarks
Why it's fast
mx is under 1 KB brotli with no build step and four API bindings. On real application workloads that buys less allocation, less DOM, less style recalc and more frame budget than frameworks many times its size. Where a competitor wins, it's listed.
- mx: ~2.0 KB
- uhtml: ~6.8 KB
- Svelte: ~12.8 KB
- Vue: ~23.4 KB
- Angular: ~37.0 KB
- React: ~59.3 KB
Paginated 10k-row table built in each framework, total JS shipped, brotli, in KB of 1,024 bytes. React includes ReactDOM and Angular is built zoneless, the default for a new Angular 22 app. Frameworks re-measured on 2026-09-25 at their latest releases. mx is its app code plus the engine counted at its full 1 KB budget.
- mx: 12 KB
- Angular: 478.6 KB
- React: 925.4 KB
- Vue: 1.22 MB
- Svelte: 6.98 MB
Heap retained (delta) per 500-operation run, M5 Pro, August 2026. mx sits at the measurement floor and reads 1.1-12 KB across runs.
- mx: 3.5 ms
- Angular: 3.9 ms
- Svelte: 5.4 ms
- Vue: 22.9 ms
Toggling a 4,095-node, depth-12 tree on M4 Pro. mx takes 3.2 ms when a single leaf changes.
- mx: 6.24 ms
- Angular: 7.28 ms
- React: 7.32 ms
- Vue: 10.94 ms
- Svelte: 11.66 ms
Paint-synchronized sort on a 120 Hz display (M5 Pro, April 2026), where the frame budget is 8.33 ms.
- mx: 0.78 µs
- Angular: 0.83 µs
- Svelte: 1.15 µs
- React: 1.39 µs
Cost to diff one DOM node. mx's 0.78 µs is ~3,100 CPU cycles on M4 Pro.
- mx: 1.5×
- React: 2.0×
- Angular: 2.0×
- Vue: 2.5×
- Svelte: 3.5×
Deep tree of 16,389 application nodes. mx's extra 0.5 is browser chrome, not framework nodes.
- mx: 4,756 B/ms
- Svelte: 28,810 B/ms
- React: 63,786 B/ms
Paginated suite: bytes of JavaScript shipped per millisecond of page-navigation work. Lower is better.
Playwright headless Chromium · M1 / M4 Pro / M5 Pro · production builds
Letting the platform do the work#
The pitch for mx is easy to misread. "under 1 KB brotli, no build step, four API bindings" can sound like a toy you'd use for a widget and outgrow by the second feature, but on real application workloads it beats larger frameworks on most of what was measured - allocation, DOM overhead, style recalc and frame budget - while shipping ~32× less JavaScript than the React build of the same app, and less even than uhtml, the next-lightest of the bunch.
The rest of the docs make this point quietly, and here it is stated plainly: the browser platform already does most of what a framework does. The DOM already reconciles, the browser already manages layout, and custom elements already have a lifecycle. mx is the thin layer that makes the platform ergonomic, and then gets out of the way. The numbers below are what "getting out of the way" buys.
Svelte wins sub-millisecond surgical mutations, while mx wins whole-set changes such as sort, payload and memory. Where mx is not the best choice lists the main races mx loses.
How these were measured#
All three suites use production builds with identical data and CSS across frameworks. Each figure below names the suite or machine it came from where that matters.
- Browser
- Playwright headless Chromium
- Hardware
- M1, M4 Pro, M5 Pro
- Builds
- Production
- Timing versions
- React 19.2.4, Vue 3.5.28, Angular 19.2.18, Svelte 5.53.2, uhtml 5.0.9, each suite at its own date
- Size versions
- Re-measured 2026-09-25: React 19.3.0, Vue 3.5.43, Angular 22.2.0, Svelte 5.57.1, uhtml 5.0.9. mx is counted at its 1 KB engine budget
- Inputs
- Identical data and CSS in every framework
- Displays
- 60 Hz and 120 Hz
- Paginated
- 10k-row table plus a depth-12 tree (4,095 nodes)
- Dashboard
- 30 and 200 assets, 20-50 Hz feeds
- SPA
- Lazy routes, 10 components
- Losses
- Listed, not hidden
Size#
mx's engine is under 1 KB brotli standalone - but the number that matters is what a real app actually ships. Below is the total JS each framework sends to the browser for the same app (a paginated 10k-row table), in brotli and measured the same way for every framework rather than comparing bare runtimes. KB here means 1,024 bytes. These sizes were re-measured on 2026-09-25 with React 19.3.0, Vue 3.5.43, Angular 22.2.0, Svelte 5.57.1 and uhtml 5.0.9, while the timing results further down keep the versions and dates of their own runs:
| Framework | Same app, total JS (brotli) | vs mx |
|---|---|---|
| mx | ~2.0 KB | 1× |
| uhtml | ~6.8 KB | ~3.5× |
| Svelte | ~12.8 KB | ~6.5× |
| Vue | ~23.4 KB | ~12× |
| Angular | ~37.0 KB | ~19× |
| React + ReactDOM | ~59.3 KB | ~30× |
"Runtime size" is slippery: Svelte and Angular have no standalone runtime (it compiles / tree-shakes into the app), and a tree-shaking framework's real footprint differs from its full prebuilt bundle (Vue's prebuilt runtime is bigger than the ~23.4 KB it tree-shakes to in this app, while React + ReactDOM barely tree-shakes, so nearly all of its ~59.3 KB here is framework code, about 30 times the whole mx app). Measuring the same app in every framework sidesteps all of that - and for the compiled ones, most of a minimal app like this is the runtime floor (a Svelte 5.57.1 hello-world build is ~7.9 KB of the ~12.8 KB here). Angular is built zoneless, the default for a new Angular 22 app, and the zone.js polyfill the app used to load would add another ~11.4 KB.
mx's engine plus terse app code is the entire ~2 KB: the engine counted at its full 1 KB budget, plus about 1 KB of app code. That is smaller than even uhtml, the next-lightest. And the framework share is a fixed floor that never amortizes away: on a full SPA in the suite, framework + app JS came to 6,910 B for mx vs 26,479 B for Svelte - 3.8× smaller (measured in June 2026 with an older mx engine, and the ratio compresses as apps grow and app code dominates, but on the small, framework-heavy end above it's 6-30×). As a share of deployed JavaScript, the framework was 9.2% of the mx app and 58.4% of the Svelte one: more than half of what the user downloads is framework code rather than the product itself.
The build runs the other direction
mx's pipeline is subtractive - concatenate and minify, and the output is ~12% smaller than the source and reproducible byte for byte, with no dependencies. A compiler-based pipeline is additive: the runtime is woven into every compiled view, so output runs ~24% larger than source (worst case measured: a 2 KB component compiling to 3.9 KB).
# mx: concatenate, minify, compress. Reproducible byte-for-byte. 0 deps.
cat src/*.js | minify > app.min.js # output is ~12% SMALLER than source
# A compiler-based framework: bundler + compiler + about 35 MB of node_modules.
# Output is ~24% LARGER than source - the runtime is woven into every view.Wire-to-source ratio: mx 0.32, Svelte 1.10. Every mx view shrinks through the build, while every compiled view expands.
Speed#
The MDN guide to how browsers render a page explains the style, layout and paint work discussed below.
Smaller doesn't mean slower. On the workloads that dominate real apps, mx matches or beats frameworks tens of times its size:
- Route navigation: 4.29 ms (mx) vs 4.26 ms (Svelte) - indistinguishable, while shipping 3.8× less JavaScript.
- Sort 10k rows: mx 2.5 ms vs Svelte 9.3 ms on M4 Pro and 2.6 vs 6.8 ms on the latest M5 Pro run, so mx is 2.6-3.7× faster. mx patches in place, while Svelte and Vue run a keyed longest-increasing-subsequence pass.
- Per-node diff: 0.78 µs (~3,100 CPU cycles on M4 Pro) - near the hardware floor for touching a DOM node in JavaScript. Angular 0.83, Svelte 1.15, React 1.39.
On M4 Pro, mx's sort costs 1.92× its page navigation, while Svelte's costs 7.75× (a compiled fast path for navigation, a much slower path for sort). Users feel variance - a jarring stall - more than they feel a slightly lower average. mx has no separate slow path for reordering, which is a deliberate property of brute-force reconciliation over a fast diff.
The speed comes from doing the simple thing. The attribute cache skips the DOM for anything unchanged, so a full re-render mostly costs a tree walk and a string of === checks. The expensive browser work - style recalc, layout - simply never gets triggered for the ~97% of nodes that didn't change.
You can see it in the style recalc cost. On the paginated suite (M5 Pro, April 2026), Chrome's total style recalc time divided by its recalc count gives 0.27 ms per recalc for mx against 1.57 ms for React, 1.65 ms for Vue, 1.78 ms for uhtml and 1.81 ms for Angular, so each recalc costs about 6× less. Svelte is level with mx at 0.29 ms.
Memory#
For background on allocation and garbage collection, see the JavaScript memory management guide on MDN.
This is the most lopsided result, and the most architectural. Heap retained (delta) per 500-operation run on M5 Pro, August 2026:
| Framework | Heap delta / 500 ops |
|---|---|
| mx | ~12 KB |
| Angular | 478.6 KB |
| React | 925.4 KB |
| Vue | 1.22 MB |
| Svelte | 6.98 MB |
mx's figure sits at the measurement floor and moves between runs (1.1 KB and 12 KB on two M5 Pro runs, 4.3 KB on M4 Pro), while Svelte reads 6.96-6.98 MB every time. Even the highest mx reading is ~580× below Svelte, which points at reconciler design rather than a particular machine or V8 version. mx allocates an estimated ~45 MB of throwaway descriptions per run (200 renders × 3,500 descriptions × ~64 bytes) and retains almost none of it - a survivor rate near zero, which means effectively no major garbage collection.
Allocation isn't free even when it's collected - the GC has to scan it. Subtract script, style, and layout from total task time and what's left is mostly minor-GC: mx 6.9 s, React 10.8 s, Svelte 13.3 s, Vue 15.1 s on the paginated suite. The ~6.4 s Svelte spends beyond mx is largely the cost of scanning what it allocated. On a long-running dashboard the trajectories diverge: in a 10-second, 200-asset stress run mx's heap shrinks by ~9 MB (GC reclaims earlier bloat) while Svelte's grows by ~2.2 MB.
No extra framework DOM nodes
On a deep tree of 16,389 application nodes, mx's total DOM count is 1.5× the app nodes - and that 0.5 is pure browser chrome, not framework nodes. mx adds zero nodes of its own. Svelte's total is 3.5× (about 2 marker nodes per app node on top of the same browser chrome), React and Angular are at 2.0× and Vue at 2.5×. Per-node heap points the same way: mx 275 B/node (the bare V8 DOM-wrapper floor) vs React 500, Vue 639, Svelte 1,397.
Deep trees#
A virtual DOM diffs the whole tree, so its cost scales with tree size, not with how much changed. mx's cost is the same tree walk, but the cache makes the mutation count irrelevant. Toggling a deep tree (4,095 nodes, depth 12) on M4 Pro:
| Cascade | mx | Svelte | Angular | Vue |
|---|---|---|---|---|
| 1 leaf changes | 3.2 ms | 4.7 | 3.4 | 22.3 |
| 500 leaves change | 3.5 ms | 5.4 | 3.9 | 22.9 |
mx is flat across a 500× change in workload - 3.2 ms to 3.5 ms. The cost is walking the tree, not applying the mutations. Two things fall out of this table:
- Angular converges with mx on tree-local updates (3.4 vs 3.2 ms, within 6%) - because Angular is, in effect, ~128 KB of minified JavaScript (~37.0 KB brotli) for the paginated app on Angular 22, nearly all of it framework, wrapped around the same algorithm mx implements in well under a kilobyte. It only pays for its size on broad updates.
- Vue is ~7× slower here: forward-propagating reactivity through 12 levels costs more than mx's full diff.
Real-time updates#
A live dashboard - 30 assets, a 20 Hz price feed, sparklines and movers updating continuously - is where allocation and frame budget bite. mx holds 60 fps with zero dropped frames and zero long tasks, matching Svelte frame-for-frame, at a 97% attribute-cache hit rate: of ~1,543 nodes walked per tick, only ~44 produce a real DOM mutation.
120 Hz reveals what 60 Hz hides
At 60 Hz, vsync rounding hides framework differences - everyone hits 60 fps. At 120 Hz the 8.33 ms budget is unforgiving, and the gap reappears. On a paint-synchronized sort (M5 Pro, April 2026):
| Framework | Paint-sync sort | vs 8.33 ms budget |
|---|---|---|
| mx | 6.24 ms | fits |
| React | 7.32 ms | fits |
| Angular | 7.28 ms | fits |
| Vue | 10.94 ms | over |
| Svelte | 11.66 ms | over by 3.3 ms |
On a 120 Hz display, Svelte and Vue drop roughly every other frame on a sort, while mx has ~2 ms of headroom to spare. Try the live reconciler benchmark: render() vs append().
Full applications#
Bytes and milliseconds compound into a single figure: performance density, the JavaScript shipped for each millisecond of work. On the paginated suite, bytes per millisecond of page-navigation time: mx 4,756, Svelte 28,810, React 63,786. For the same work, mx ships about 13× fewer bytes than React and 6× fewer than Svelte. (On the SPA suite, measured as wire bytes per millisecond of route nav, mx is 3.9× denser than Svelte - a different cut of the same result.)
mx keeps pace with a leading compiled framework on route navigation (4.29 vs 4.26 ms) at 3.8× less wire weight, hundreds of times less retained heap and a fraction of the DOM. It is fast and small at the same time, and being small is part of why it's fast, since there's less code to parse, less to allocate and less for the browser to recompute.
Where mx is not the best choice#
mx loses some races, and you should know which ones:
The short version
- Svelte wins sub-millisecond surgical mutations.
- mx wins whole-set changes such as sort, payload and memory.
- Raw keyed-list creation (create-1,000-rows, krausest-style): uhtml's
html.for(obj)wins. mx's identity-move shines on reordering existing rows, not on bulk first creation. - First-paint LCP if you ship client-only: a client-rendered mx dashboard paints at ~200 ms vs a Svelte SSG build at 44 ms. Pre-rendered HTML wins first paint, but that's a deployment choice rather than a limit: mx precompiles to static HTML and upgrades in place, so precompile the shell when LCP matters. The sample just happened to ship client-only.
- List-heavy declarative templates: Svelte's
{#each}+{#snippet}is terser for pure-presentational rows (one component measured 45% smaller). mx wins on stateful, imperative components, while Svelte wins on declarative lists. - Page navigation micro-benchmark: Svelte edges mx by ~8% on isolated page-nav (a compiled binding fast path): mx 1.3 ms vs Svelte 1.2 ms. It's 0.1 ms. You won't feel it, but it's real.
- Rapid page bursts: on a 10-page burst, Svelte's compiled path spends ~12% less JavaScript time (mx 10.7 ms vs Svelte 9.4 ms on M4 Pro, 9.4 vs 7.4 ms on the latest M5 Pro run). mx wins single sorts decisively but concedes this one.
- Row edits with a full re-render: in the admin panel benchmark (1,000 users, M5 Pro), Svelte's JavaScript time on add, delete, inline edit, save and bulk delete is 2.7-8× below mx re-rendering the whole table. A keyed
dom()Map matches Svelte's JavaScript time on those rows. - Datepicker: mx forces 153 layouts to Svelte's 52, and its total task time is 1.7× Svelte's (189.6 vs 112.3 ms, M5 Pro).
- Worst-case frames and slower hardware: on the paginated suite mx's slowest run is 2.5× its median against Svelte's 1.7×. On an M1-class Mac the 200-asset dashboard drops mx to ~92 fps with 17.7% dropped frames while Svelte holds 120 fps, because mx reconciles every node on each tick.
Static or dynamic: mx does both
The comparison that matters is static precompilation versus a dynamic app rather than a compiler versus mx, and mx does both. It renders to static HTML through any minimal server DOM (happy-dom, or linkedom from uhtml's author) - this very site is built that way - and then upgrades the same markup in place on the client, with no hydration step.
So the usual consensus applies without picking a framework. Precompile content and marketing pages for instant first paint. Ship a plain SPA for SaaS and anything behind a login (first paint matters less there, and the shell caches). For a hybrid - a social feed, say - prerender the shell and let mx take over, which is exactly what parasitic hydration is for. The places mx loses are the narrow ones above (bulk keyed-list creation, the terseness of a pure declarative list) rather than "dynamic vs static," which it handles either way.
Going deeper#
The mechanism behind these numbers: how no-op renders stay free.
How the same patterns hold up across a 200-component app.
The philosophy behind the numbers.
The render() vs append() benchmark is live and runs in your browser without any setup or build. It runs nine DOM-table operations against the ways mx builds UI (positional render(), a keyed dom() Map and the append() path) and a vanilla-DOM baseline, so you can see the cache working.