FerrousPath

Wasm Lab

Everything on this page is computed twice: once by a 16 KiB Rust module compiled to WebAssembly (wasm-labs/src/lib.rs in this repository) and once by the same algorithm written in JavaScript. Nothing is sent to a server. The module uses no bindings generator — the page calls its exported C-ABI functions directly, as described in the WebAssembly lesson.

Mandelbrot explorer

Click to zoom in, shift-click to zoom out. Each frame is rendered by both engines.

Frame time

Rust → wasm
–
JavaScript
–

Micro-benchmarks

Two different shapes of work: a sieve that hammers memory, and naive recursion that is nothing but function calls. Modern JavaScript engines are fast — expect the gap to be smaller than folklore suggests, and to vary by browser. That is the honest lesson.

TaskResultRust → wasmJavaScript
Count primes below 20,000,000–––
Recursive fib(38)–––