examples bench repl v0.8.1 experimental

JZ

Computational JS
at native speed

Compile your JS to WASM. No runtime, no GC, tiny output.
For DSP, math, visuals and more.

Faster than

··op/s

What is JZ?

A compiler for a distilled JavaScript subset — Crockford’s “good parts”.

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, the frontend
Image, video, pixels Servers, APIs, I/O
Simulation, physics, games Async, promises, events
Parsers, codecs, compression Dynamic, polymorphic, OOP
Scientific, numeric, ML Security crypto, big-ints
Hashing, checksums, RNG Glue, plumbing, orchestration
What is supported?

A minimal modern functional JS subset – no async, dynamic constructs or OOP. Compat layer enables some legacy APIs.

Not supported async/awaitPromisegeneratorsevalProxy ReflectdefinePropertygetters/settersDOM fetchNode Intl

Compat varfunctionswitchclass extendsthis super#private== !=instanceof

Strict let/const=>…spreaddestructuringimport/exportif/for/whiletry/catchnumbersstringsarrays objectstyped arraysMath JSON RegExpMap Set

Full list →

Why no types?

Clean code already carries them: let x = 0.5, Float32Array, index, counter in a loop — you know the types without being told, and so does JZ. Annotations add nothing a reader (or a model) can’t already see; they just smear a second language onto a program logic. Anything dynamic falls back to a slower, always-correct path.

Why not AssemblyScript, Porffor?

AssemblyScript is a TypeScript dialect — can’t run in a JS engine. Porffor chases the whole JS spec that affects performance and cannot compile itself yet.

Why not Rust, Go, or C?

A matter of preference. JS is more common – if you can compile it to WASM or native with comparable performance — why second language to keep in sync?

Is it fast?

Same source, over 2× faster than V8 at near-native speed — geomean across the bench corpus (chart below; per-case numbers on the bench page), also ahead of Rust→wasm and AssemblyScript→wasm. JZ auto-vectorizes (SIMD) where the Rust/C→wasm paths don’t; a few cases Rust native vectorizes better — a limitation of WASM.

If you hit a slow case, report it →

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, and CI passes self-compiled build the full test suite. self-host CI status

Is it production ready?

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

But: CI gates the full suite, test262, the bench, and the self-compile. A fuzzer diffs every kernel against the same source in V8.

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

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 →