omid.dev Companion demo
Rust WASM Performance Demo
From article: Building High-Performance Web Applications Leveraging WebAssembly and Rust

WebAssembly benchmark

JavaScript vs Rust WASM

Both implementations run the exact same CPU-heavy loop in your browser. Compare wall-clock time and see how WebAssembly handles number crunching.

What is being measured?

Each run sums for every integer from 0 to N − 1 in a tight loop — no DOM updates, no network, just pure computation.

The JavaScript version runs on the main thread. The Rust code is compiled to WebAssembly and called through wasm-bindgen. At 1M and 5M, we use the original blog timing (one JS run, then one WASM run). Larger workloads add warmup and multiple samples.

Workload size

Hard limit: ~4,294M iterations (Rust u32 max). 1000M can freeze the tab for minutes.

Module status

Loading Rust WASM module…

How to read this