JS as it is
to native speed

Compile plain JS to WASM.
For DSP, math and visuals.

··op/s

Demo compiling in your browser…

What is JZ?

JZ compiles JavaScript to WASM at native speed.

Valid JZ is valid JS: same source runs as plain JS or compiles to .wasm – sandboxed, portable, memory-safe. No runtime, no GC, no type annotations, auto-SIMD, deterministic output.

Good for Not for
DSP, audio, synthesis UI, DOM, frontend
Images, video, pixels Network, hot I/O, serving
Simulation, physics, games Dynamic objects, monkey-patching
Parsers, codecs, compression Allocation-heavy, long-lived states
Scientific, numeric, edge ML Security, cryptography, arbitrary-precision integers
Hashing, checksums, RNG Tiny calls where the JS/WASM boundary dominates

How do I use it?

The CLI (jz kernel.js) or the API (compile()) produces a plain .wasm you load like any other module. Setup & options →

Is it fast?

Faster than V8 and AssemblyScript on almost every kernel we measure, about 2× on average. Every number, and every loss, is on the bench page.

If you hit a slow case, report it →

How can it beat V8?

WASM isn’t magically faster: V8 also compiles hot JS to machine code. But V8 has to stay ready for any JavaScript, so every hot loop carries checks and a garbage collector. JZ sees the whole program before it runs: fixed layouts, direct calls, no GC, and SIMD on loops V8 leaves scalar.

What is not supported?

Not supported eval Function withProxy Reflectdescriptorsprototype chainstop-level awaitimport()DOMNode Intl Temporal

What's supported: classes, generators, async/await, destructuring, BigInt, typed arrays, Map/Set, RegExp, Date, JSON, timers.

What differs: no GC (call memory.reset()), 64-bit BigInt, compile-time regexes, ASCII case and UTC dates. Details →

Why no types?

JS code already carries useful type evidence: let x = 0.5, Float32Array, an array index, a loop counter. JZ infers it instead of turning the file into another language. Ambiguous values take a slower dynamic path.

How does it compare?

Porffor aims at the full spec but emits no WASM and runs slower than V8 on the cases it completes. AssemblyScript compiles a typed TypeScript dialect; its WASM runs about 2× behind JZ on the corpus. scriptc makes native binaries from TypeScript, no WASM.

Rust, C, Zig and Go compiled to WASM run about 2× behind JZ by geomean, Go’s over 4×; as native binaries only C is level. If it is already Rust, keep it in Rust. If it is JavaScript, a rewrite buys a second toolchain and test suite for slower WASM.

Can it go native?

jz → wasm2c → clang -O3 produces a standalone native binary. See full pipeline →.

Can it compile itself?

JZ compiles itself to jz.wasm. CI checks the wasm-hosted compiler against the test suite. self-compile CI status

Is it production ready?

It’s experimental (pre-1.0) – ABI can still shift.

But real code already ships on it: color-space v3 builds its precompiled 27-space WASM backend with JZ.

And the exit is free: valid JZ is valid JS – drop the compile step and the same file keeps running.

Examples

Why JZ exists

JS is considered slow and not serious: runtime with JIT, GC hits, language quirks. Spec only adds and never deprecates.

But I like minimal, functional JavaScript – Crockford’s good parts. That created an urge to stabilize JS – drop the legacy, no OOP, no classes, no runtime. Javascript Zero. I am not a compiler engineer, but I know how to write minimal atomic code, so I went in steps: subscript parser, then watr compiler, then JZ. AI improved the initial minimal architecture to what we have now.

The ambition: JS compiled AOT, faster than V8 on every kernel, smaller than AssemblyScript, same file still runs as JS.