Skip to content

ZIPP v0.0.33

Choose a tag to compare

@github-actions github-actions released this 07 Nov 05:09
· 58 commits to main since this release

ZIPP 0.0.33

A speed and size release. Compiled code and the interpreter do less work
for the everyday operations of JavaScript: making objects, calling methods,
reading private fields and accessors, try blocks, array and string
methods, regular expressions, JSON, % and Math. The WebAssembly engines
no longer carry Node's layer, which they could never run, and are smaller
for it: 10.7% for the JavaScript engine and 13.5% for the Lite one, as
served with Brotli. Over 90 benchmark programs 0.0.33 takes 0.66x 0.0.32's
time with the JIT and 0.87x interpreted, and with the JIT it is ahead of
Node 24 on 72 of the 89 that Node runs (0.0.32: 53). Four bugs that 0.0.32
shipped are fixed: a long compiled loop could not collect garbage, a setter
that did more than store a field was cut short in compiled code, super()
called from an arrow function lost the construction's new.target, and a
compiled String() with no argument could return a stale value.

New in 0.0.33

  • Smaller WebAssembly engines. Node's layer (395 KB of embedded
    JavaScript for stream, events, fs, readline and the rest, and its
    host code) is now a Cargo feature, node, on by default for the command
    line and native embedders and left out of the WebAssembly engines and the
    hardened zipp-sandbox build, none of which can run it. The browser
    modules also drop code they can never reach: Atomics in a single-agent
    build, the superinstructions of a metered build, the environment switches
    (fixed in a browser), the test harness's second realm, and duplicate copies
    of sorts and tree walkers. See Downloads for the sizes.
  • Objects cost less to make. An object literal, or new of a
    constructor whose body only stores its arguments, takes an object already
    installed in its slot and fills it: about 30 instructions in compiled
    code, where { a: i, b: 2 } took 674 and new P(i, 1) 1,208. A dead
    young object's slot becomes the next one's. new of such a constructor
    is answered at the call site, and the interpreter answers new of a
    simple constructor without a frame.
  • A try costs nothing until something leaves its body. Compiled code
    pushes a handler only on the way out of a try by a throw or a bail; a
    body that finishes never touches the handler stack. finally brackets,
    return through finally, break and continue out of a try, and
    try … catch … finally in one statement work the same way. A loop around
    a try and catch runs in about a quarter of the cycles.
  • Calls. Compiled code recurses as deep as the command line's stack
    (it fell back to interpreted frames past 64 levels), and three functions
    calling one another no longer recompile for the life of the program. A
    small function whose body reads arguments, globals and captured
    variables, branches forward and returns is run without a frame of its
    own, by the interpreter as well as by compiled code. A getter or setter
    that only reads or stores a field is answered in place.
  • Classes. Compiled code reads and writes a private field where it lies
    (a read went from about 8 ns to 3) and calls a private method through its
    site's cache (47 ns to 19). An accessor seen on many objects of one
    layout is called through a lane keyed by that layout. Class statics and a
    class's own Symbol.hasInstance are called natively, and super.name
    and #x in obj compile.
  • Arrays. Compiled shift, unshift, splice, reverse, fill,
    indexOf, lastIndexOf, includes, slice, concat, join and at
    on a plain array skip the builtin call chain (shift 62 ns to 33,
    indexOf over 500 elements 474 ns to 140); i in a is answered from
    the array itself (13 ns to 3); Object.keys of an array reads cached
    index strings. A map, filter or reduce callback that reads captured
    variables, and a find, findIndex, some or every predicate, run in
    the fused callback kernels.
  • Strings and regular expressions. A global match and a regex
    split scan the subject once instead of running the full exec
    protocol per match, and a search over a non-ASCII string skips the
    positions no match can start at. normalize runs once instead of twice,
    a search in a non-ASCII string seeks by lead bytes, and a one-character
    string is shared. Eighteen string methods (slice, trim, padStart,
    repeat, toUpperCase and the rest) are called from compiled code
    without the builtin call chain.
  • JSON. A reviver's results are written back in place (a parse with a
    reviver 76 ms to 42), and JSON.stringify with an indent takes the fast
    walk.
  • Numbers. % of two integral doubles takes the integer remainder
    instead of a software fmod. Math.round, fround, sign and clz32
    are inline machine code, Math.min, max and hypot of three to eight
    numbers compile, and a double's text is built on the stack. BigInt
    arithmetic on values beyond 128 bits reads its operands where they lie
    and keeps the result in its heap slot, in the command line and native
    embeddings (an addition of two 200-bit values made six allocations and now
    makes one).
  • Typed arrays and DataView. The integer tier reads Uint32Array
    elements, so a CRC table loop compiles there, and a compiled
    dv.setUint32(…) takes the DataView accessor lane in either of the two
    forms a method call compiles to.
  • A script's global loops (a var at a script's top level is a global)
    run as three- and four-instruction superinstructions: a global counter's
    loop takes a third less time.
  • Async functions and generators give their register window back when
    they finish, for the next one to use, and an await of a value that is
    not a promise queues its resume directly.
  • An optimizing tier, off by default. ZIPP_OPT=1 turns on Tier O: SSA
    form, linear-scan register allocation, inlining, and deoptimization with
    feedback, entered from the baseline tier after a function's first 1,000
    calls. It is experimental: faster than the default tier on some numeric
    loops, slower on object-heavy code, so it stays off.

Downloads

File What it is
zipp-0.0.33-windows-x86_64-portable.exe The Windows command line; run it from anywhere.
zipp-0.0.33-windows-x86_64-installer.msi The same binary, installed for the current user into %LOCALAPPDATA%\Programs\ZIPP and added to PATH; no administrator rights. Uninstall from Settings > Apps.
zipp-0.0.33-linux-x86_64 The Linux command line, x86-64 (glibc 2.35 or later). chmod +x it after downloading.
zipp-0.0.33-linux-arm64 The same for 64-bit Arm.
zipp-0.0.33-linux-armv7 The same for 32-bit Arm (hard float); interpreter only, and WebAssembly on wasmi.
zipp-0.0.33-javascript.wasm The JavaScript engine for browsers, Node, Deno and Bun.
zipp-0.0.33-javascript-typescript.wasm The same with TypeScript and TSX.
zipp-0.0.33-javascript-lite.wasm The JavaScript core without Intl and Temporal, built for size.
zipp-0.0.33-javascript-python.wasm JavaScript and Python, torch built in.
zipp-0.0.33-javascript-python-base.wasm JavaScript and Python without torch.
zipp-0.0.33-torch-package.wasm The torch package for the -python-base engine.
zipp-0.0.33-<engine>.wasm.br Each WebAssembly module compressed with Brotli (quality 11), about a quarter of its size. Serve it with Content-Encoding: br and Content-Type: application/wasm, or let zipp.mjs load it; the plain .wasm is the default.
zipp-0.0.33-wasm-embed-kit.zip zipp.mjs (the loader and sandbox, version 1.5.0, unchanged) and its types, the host SDK (1.4.0), the engine's TypeScript declarations, the browser GPU adapter, docs and three examples.
SHA256SUMS Checksums of every file.

The WebAssembly modules against 0.0.32's, in bytes (the 0.0.33 figures are
the release build's dry run at the release's engine source):

Module 0.0.32 0.0.33 Change
javascript.wasm 5,612,037 4,854,370 −13.5%
javascript.wasm.br 1,405,104 1,254,257 −10.7%
javascript-typescript.wasm 5,955,731 5,191,704 −12.8%
javascript-typescript.wasm.br 1,477,047 1,324,337 −10.3%
javascript-lite.wasm 3,446,021 2,832,199 −17.8%
javascript-lite.wasm.br 899,764 778,472 −13.5%
javascript-python.wasm 9,380,719 8,616,452 −8.1%
javascript-python.wasm.br 2,170,760 2,021,244 −6.9%
javascript-python-base.wasm 7,343,820 6,579,144 −10.4%
javascript-python-base.wasm.br 1,793,772 1,645,182 −8.3%
torch-package.wasm 2,163,109 2,163,109 unchanged

Changes in behaviour

  • The WebAssembly engines and zipp-sandbox have no Node layer. It was
    only ever turned on by the command line, so nothing a page or an embedder
    could run changes; a bare module specifier in those builds is joined to
    the importing folder, as in 0.0.30. The command line and native
    embeddings keep the layer (the node feature is on by default); a
    native embedder that builds zipp-vm without default features now has
    to name it.
  • ZIPP_OPT=1 turns on the optimizing tier described above. Nothing
    changes without it.
  • zipp_vm::set_native_stack_bytes also bounds deep re-entry by the
    stack.
    Recursion that nests the engine natively (a generator that
    calls back into its own for…of, a callback that recurses through
    forEach) throws the catchable RangeError once it would run into the
    last eighth of the stack declared on that thread (at least 1 MiB), on
    every architecture, as well as at the fixed depth cap. A native embedder
    that declares a stack should declare one its thread really has. Without
    a declaration only the depth cap applies, as before. The command lines
    declare their 256 MiB.

Fixes

  • A long compiled loop could not collect garbage. Compiled code
    reached a collection only inside the helpers that happened to check for
    one, so a loop whose calls were inlined and whose allocations all came
    from a builtin (a regex exec's match array and captures, a slice)
    never reached one: a million execs of a global regex over a record ran
    one collection and grew the heap to 4 million slots, where the
    interpreter ran 239 collections and peaked at 66 thousand. A compiled
    loop's back-edge now collects when a collection is due.
  • A setter that did more than store a field was cut short in compiled
    code.
    set y(v) { this.k = v; if (v === 5000) calls++; } ran as the
    store alone; the rest of the setter never ran.
  • super() called from an arrow function lost new.target. In
    constructor() { const f = () => super(x); f(); } the parent
    constructor saw new.target as undefined, so new.target.name in it
    threw a TypeError where Node runs.
  • String() with no argument could return a stale value in compiled
    code.
    Compiled code took every String(…) call through its
    one-argument path, so String() converted whatever its argument
    register last held: String() + String(a, n) + String() in a hot
    function gave "2999|3000|3000" where Node gives "|3000|".

Dependencies

  • Wasmtime 36.0.20, on its long-term support line, and wat 1.263, for the
    64-bit command lines' WebAssembly.

Performance

Measured on 7 November 2026 on an otherwise idle machine, native Windows
x86-64 (Ryzen 9 9950X3D): the published 0.0.32 Windows binary against the
0.0.33 Windows binary from the release build's dry run, built from this
release's engine source by the same profile-guided recipe, with Node
24.19.0 in the same runs. Both ZIPP binaries run with address-space
randomization turned off and the code cache off, pinned to one core; the
figures are medians of 5 interleaved runs (11 for the rows noted). Every
one of the 90 programs prints the same output under 0.0.32 and 0.0.33 in
both lanes.

The 90 benchmark programs (0.0.32's 78, the seven bundled applications
and five TypeScript benchmarks compiled to JavaScript). The geometric means
are over the 87 programs one pass timed with all three engines; the other
three (the TypeScript bundle, which Node cannot run, and two ES-module
programs) were timed separately and are given below, and the counts against
Node include the two modules.

  • With the JIT: 0.664x 0.0.32's time, faster on 76 of 87. The largest
    gains are arguments_len (0.009x), new_obj (0.011x), new_class
    (0.012x), obj_literal (0.079x), upval_rw (0.17x), try_catch
    (0.22x), call0 (0.34x), arr_write (0.35x), dataview-binary (0.36x),
    regex-unicode-sticky (0.40x) and recursion-shapes (0.44x). Slower:
    i32_rw (1.06x over 11 runs) and bytecode-vm (1.02x).
  • Against Node 24, with the JIT: 0.609x Node's time, ahead on 72 of
    the 89 programs Node runs, where 0.0.32 took 0.917x and was ahead on 53.
    Node is still ahead on
    babel (3.76x), class-features (2.11x), expr-compiler (2.07x),
    collections (1.74x), the eight libraries (1.68x), recursion-shapes
    (1.63x), dataview-binary (1.49x), generators-iterators (1.44x),
    regex-unicode-sticky (1.39x), numbers-format-parse (1.37x),
    destructuring-spread (1.34x), raytracer (1.29x), large-heap-churn
    (1.28x), old-to-young (1.26x), await-sustained (1.25x), Prettier
    (1.11x) and Vue server rendering (1.02x).
  • Interpreted (ZIPP_NOJIT=1 ZIPP_NO_RX_JIT=1, no native code at all):
    0.872x 0.0.32's time, faster on 71 of 87. The largest gains are
    arguments_len (0.13x), new_class (0.38x), new_obj (0.40x),
    regex-unicode-sticky (0.49x), str_charcode (0.51x), raytracer
    (0.64x), call_method (0.65x) and g_counter (0.69x). Slower by more
    than 2%, each by about 3%: switch8, lived, prop_read, proto_read,
    shapes-stable, and over 11 runs bytecode-vm and i32_rw.
  • Against node --jitless, interpreted: 0.948x its time, ahead on 54
    of 89, where 0.0.32 took 1.087x and was ahead on 41.
  • Against QuickJS, in a separate run the same day by the same method
    (Bellard's QuickJS 2026-06-04 and QuickJS-NG 0.18.0, which interpret
    only; neither runs React server rendering, which needs TextEncoder, and
    QuickJS-NG also fails accessors-proxy). Interpreter against
    interpreter, 0.0.33 takes 0.649x Bellard's QuickJS's time over the 89
    programs it runs and is faster on 79 (0.0.32's notes: 0.742x, 62 of 78).
    The gaps left are proto_read (1.38x), f64_write (1.37x), i32_rw
    (1.24x), upval_rw (1.16x), arr_read (1.14x), prop_write (1.11x),
    arr_write (1.09x), and large-heap-churn, property-ic-shapes and
    try_catch within 2.5%. Against QuickJS-NG it
    takes 0.464x the time over 88 and is faster on 87, all but
    eval-function (1.04x). With the JIT, 0.0.33 takes 0.188x Bellard's
    QuickJS's time and 0.133x QuickJS-NG's, slower than either only on
    eval-function.
  • The other three (medians of 7 runs): the TypeScript bundle, which
    Node cannot run (its bundled os is a stub), takes 0.971x 0.0.32's time
    with the JIT and 0.961x interpreted. The two ES-module programs are about
    even with 0.0.32 with the JIT (entry 0.98x, nanoid-non-secure 1.01x)
    and 0.95x and 0.99x interpreted, and ahead of Node in both lanes: 0.26x
    and 0.78x Node's time with the JIT, 0.88x and 0.91x node --jitless's.

Bundled applications, against Node 24.19.0, Bellard's QuickJS
2026-06-04 (its Cosmopolitan binary) and QuickJS-NG 0.18.0 (its Windows
x86-64 binary). Each figure is the whole run of one process, including
compiling the bundle, the median of 7 runs with every engine interleaved,
pinned to one core, ZIPP's code cache off. Every engine that finishes a
bundle prints the same output as ZIPP.

With the JIT:

Program ZIPP 0.0.32 ZIPP 0.0.33 Node 24 Bellard's QuickJS QuickJS-NG
Babel: @babel/standalone transforms about 20 KB of modern JSX twice 2.99 s 2.86 s 0.75 s 3.65 s 5.06 s
TypeScript: transpileModule on about 40 KB of classes, generics and enums 861 ms 836 ms fails: its bundled os is a stub 1.04 s 1.33 s
Prettier: formats JavaScript, TypeScript and Markdown 401 ms 393 ms 355 ms 440 ms 585 ms
marked, lodash, acorn, terser, three.js, immer, RxJS and date-fns 644 ms 564 ms 341 ms 1.90 s 1.95 s
Vue server rendering 74.9 ms 73.1 ms 73.0 ms 84.8 ms 105.1 ms
Preact server rendering 60.3 ms 61.4 ms 62.6 ms 73.3 ms 101.6 ms
React server rendering 59.4 ms 59.6 ms 63.3 ms fails: no TextEncoder fails: no TextEncoder

Interpreter against interpreter: ZIPP with ZIPP_NOJIT=1 ZIPP_NO_RX_JIT=1
(no native code at all) and node --jitless. QuickJS has no JIT, so its
figures are the same runs as above.

Program ZIPP 0.0.32 ZIPP 0.0.33 node --jitless Bellard's QuickJS QuickJS-NG
Babel 2.98 s 2.86 s 1.63 s 3.65 s 5.06 s
TypeScript 867 ms 833 ms fails 1.04 s 1.33 s
Prettier 400 ms 397 ms 260 ms 440 ms 585 ms
The eight libraries 648 ms 561 ms 349 ms 1.90 s 1.95 s
Vue server rendering 74.3 ms 72.9 ms 70.2 ms 84.8 ms 105.1 ms
Preact server rendering 58.3 ms 57.9 ms 62.9 ms 73.3 ms 101.6 ms
React server rendering 60.7 ms 59.3 ms 63.8 ms fails fails

ZIPP runs a program of 256 or more functions interpreted even with the JIT
on (every bundle here but Preact's), which is why its two tables differ
so little. On every bundle QuickJS runs, 0.0.33 is faster than both
QuickJS builds: 0.30x to 0.90x Bellard's QuickJS's time (interpreted: the
eight libraries 0.30x, Babel 0.78x, Preact 0.79x, TypeScript 0.80x, Vue
0.86x, Prettier 0.90x) and 0.29x to 0.70x QuickJS-NG's. Against
node --jitless, interpreter against interpreter, it is ahead on Preact
and React server rendering (0.92x and 0.93x its time), about even on Vue
(1.04x) and behind on Babel (1.75x), the eight libraries (1.61x) and
Prettier (1.52x).

Babel and the libraries spend most of their time in code that Node's
optimizing compiler specializes and ZIPP's tiers do not yet; those gaps
want an optimizing tier with type speculation, which ZIPP_OPT=1 begins.

Publishing

As for earlier releases, the engines the site serves are refreshed AFTER this
release exists, in one commit that:

  1. sets zippEngineRelease in landing/package.json to 0.0.33;
  2. refreshes landing/public/playground-runtime and landing/public/wasm from
    zipp-0.0.33-javascript-python.wasm and zipp-0.0.33-javascript.wasm
    (node crates/zipp-wasm/embed-kit/package.mjs extract, then
    sync-playground.mjs --refresh-engine), SHA256SUMS-verified;
  3. syncs the sandbox playground (node landing/scripts/sync-sandbox.mjs with
    the release's files) and rewrites the site's Brotli copies
    (npm run compress:engines);
  4. updates the version, size and SHA-256 that landing/src/App.tsx and
    landing/README.md state about the bundled engine.