WebAssembly Benchmark

How fast does your browser run real WebAssembly? Five .wasm modules — integer arithmetic, bitwise hashing, a floating-point simulation, an in-memory sort and a fractal calculation — each compiled and executed with WebAssembly.instantiate, the same amount of work for every visitor, run one after another. Lower total time is better.

Your browser doesn't support WebAssembly, which this benchmark requires. Try a recent version of Chrome, Edge, Firefox or Safari.

...
Your Result
ms

View TOP 500 Leaderboard

About WebAssembly

WebAssembly (often shortened to "Wasm") is a low-level binary instruction format designed to run inside a browser at close to native speed. It was developed jointly by Google, Mozilla, Apple and Microsoft and shipped simultaneously in Chrome, Firefox, Safari and Edge in 2017, after a couple of years of public design work under the W3C. Unlike JavaScript, which a browser has to parse and interpret or just-in-time compile from source text, WebAssembly ships as compact, pre-compiled bytecode that an engine can validate and turn into machine code almost immediately, with no interpreter warm-up needed.

Its single biggest use case is bringing existing native code — written in C, C++, Rust or Go — onto the web without rewriting it in JavaScript. In practice that shows up as heavyweight desktop software running in an ordinary browser tab: Figma's and Photoshop's web editors, AutoCAD's web viewer and Google Earth all lean on WebAssembly for their core engines. Game studios use it to publish Unity and Unreal projects as playable browser builds, retro-console emulators use it to run original hardware code at full speed, and it's a common choice for audio/video codecs, image filters, cryptographic libraries, in-browser data compression and scientific or CAD number-crunching — anywhere JavaScript alone is too slow but asking someone to install a native app isn't realistic.

This benchmark builds five real WebAssembly modules by hand, encoding the binary format's type, function, memory, export and code sections and their instruction opcodes directly in this page's own JavaScript, with no external compiler or library involved — then runs each one through WebAssembly.instantiate exactly as any WebAssembly application would. The five workloads sample the kind of work WebAssembly typically does: a raw integer arithmetic loop, a bitwise hashing/mixing pass, an iterative floating-point calculation, an array sort performed in WebAssembly's own linear memory, and a fractal escape-time calculation representative of pixel-level image work. Every workload runs a fixed number of operations, so the input is identical for every visitor. The score is the combined wall-clock time to compile and run all five, in milliseconds, timed with performance.now() — lower is better.