Skip to content

ZIPP v0.0.40

Choose a tag to compare

@github-actions github-actions released this 24 Nov 05:29
· 139 commits to main since this release

ZIPP 0.0.40

A major multi-round performance release delivering large speedups across real-world Python and JavaScript applications, the official JS and Python benchmark suites, the regex engine, WebAssembly / safe-sandbox builds, and the PHP and Rust runtimes — plus readable JS function names in Linux JIT perf-map labels and routine dependency updates.

Thank you to @codeandsolder for contributing PR #110 ("perf: include JS function names in Linux JIT perf-map labels"), which appends sanitized FuncProto.name labels (fn4264_querySelectorAll_whole-fn) to ZIPP_PERF_MAP=1 ranges while keeping zero overhead when perf-map profiling is off! Your profiling feedback and PR directly made DOM-heavy JS profiling much clearer and helped drive several of the hot-path wins in this release.

Benchmark Highlights (v0.0.40 vs. v0.0.39, Node.js & CPython)

All measurements below were captured on Windows x86-64 with identical byte-for-byte output against Node.js v24.19.0 and CPython 3.13, comparing a local non-PGO fat-LTO v0.0.40 build against the published PGO v0.0.39 portable release binary (so release PGO builds of v0.0.40 will widen these gains further).

Official JS Suite (bench/real — ZIPP v0.0.40 vs. Node.js, Bun & Deno)

3-rep cold medians via tools/bench.py (ALL_CORRECT=1; startup: ZIPP 10.2 ms vs. Node.js 34.3 ms, Bun 52.7 ms, Deno 87.6 ms):

Benchmark Node.js Bun Deno ZIPP v0.0.40 ZIPP / Node.js
async-promise-chain 357 ms 405 ms 386 ms 277 ms 0.77×
class-prototype-hot 313 ms 351 ms 339 ms 218 ms 0.70×
json-large 310 ms 241 ms 374 ms 275 ms 0.90×
map-set-heavy 941 ms 979 ms 1612 ms 837 ms 0.85×
markdown-render 297 ms 244 ms 348 ms 199 ms 0.67×
parse-large-js 294 ms 263 ms 305 ms 251 ms 0.82×
polymorphic-objects 353 ms 351 ms 346 ms 307 ms 0.88×
polymorphic-objects-v2 92 ms 103 ms 143 ms 33 ms 0.36×
property-ic-shapes 273 ms 170 ms 320 ms 16 ms 0.06×
regex-log-scan 532 ms 627 ms 492 ms 469 ms 0.88×
sparse-array 89 ms 119 ms 141 ms 59 ms 0.68×
sparse-array-v2 187 ms 389 ms 192 ms 91 ms 0.49×
typedarray-math 212 ms 964 ms 179 ms 151 ms 0.70×
Geomean (13/13 wins vs. Node, 38/39 overall) — — — — 0.58× (0.78× headline)

Real-World Applications (Steady-State Warm Median & 8-Run Wall Clock)

App Reference Runtime Ref Warm / Wall(8×) ZIPP v0.0.39 (PGO) ZIPP v0.0.40 Warm / Wall(8×) Speedup vs. v0.0.39 v0.0.40 vs. Ref (Warm / Wall)
linkedom Node.js v24.19.0 1.31 ms / 336–337 ms 9.56 ms 6.14–6.21 ms / 467–473 ms 1.55× faster 4.69–4.74× / 1.38–1.41×
defuddle Node.js v24.19.0 26.05–26.73 ms / 597–604 ms 160.32 ms 139.76–146.77 ms / 1595–1650 ms 1.09×–1.15× faster 5.36–5.49× / 2.64–2.76×
webforai Node.js v24.19.0 17.57–18.30 ms / 521–522 ms 107.57 ms 102.18–107.16 ms / 1277–1351 ms 1.00×–1.05× faster 5.58–6.10× / 2.45–2.59×
html2text CPython 3.13 5.60–5.67 ms / 198–206 ms 41.15 ms 14.31–15.39 ms / 282–289 ms 2.67×–2.88× faster 2.55–2.72× / 1.37–1.46×
bs4_css (BS4 + SoupSieve) CPython 3.13 5.74–5.89 ms / 282–300 ms 65.73 ms 36.12–38.44 ms / 482–502 ms 1.71×–1.82× faster 6.13–6.70× / 1.68–1.71×
markdownify CPython 3.13 7.87–8.10 ms / 227–239 ms 104.80 ms 54.03–56.54 ms / 645–671 ms 1.85×–1.94× faster 6.67–7.19× / 2.81–2.84×

Other Official & Algorithmic Suites

Suite v0.0.39 (PGO) v0.0.40 (non-PGO fat-LTO) Highlights
Python tools/python_bench.py (44 programs vs. CPython 3.13) 0.79× geomean 0.62× geomean (~1.27× faster overall) micro 0.60×, macro 0.75×, 26/36 wins over CPython; try_raise_catch 2.4× → 0.29×, instance_new 2.6× → 1.37×, sort_heapq 2.3× → 1.27×, builtin_isinstance 0.63×, generator_iter 0.95×.
JS bench/regex (16 patterns vs. Node.js) 2.44× geomean 1.90× geomean (~1.28× faster overall) literal-utf16 4.0× → 0.82× (now beating Node), lookbehind 1.41× faster.
JS bench/hostile (stress tests vs. Node.js) 4 slowest lagged Node 3 of 4 flipped to beating Node reactish-reconcile 1.21× → 0.97×, shapes-megamorphic 1.04× → 0.85×, calls-closures 1.12× → 0.93×, allocation-survival 1.35× → 1.24×.
PHP & Rust runtimes (O(N²) fixes) O(N²) / O(N² log N) O(1) / O(N) PHP array_pop stack ~65× faster (614 ms → 9.5 ms), PHP cursor loop ~180× faster (2266 ms → 12.5 ms), Rust VecDeque/BTreeMap/String::pop 8.6× faster (481 ms → 56 ms).

New in 0.0.40

  • Linux JIT Perf-Map Function Labels (#110, by @codeandsolder):
    • Appends sanitized JS function names (capped to 64 ASCII-safe characters) to ZIPP_PERF_MAP=1 symbols (fn{id}_{name}_{tier}), retaining numeric-only labels for anonymous functions and preserving zero overhead when perf-map profiling is disabled.
  • JavaScript VM, x86-64 JIT & Allocator/GC Throughput:
    • Prevents enclosing MEM OSR regions from shadowing inner INT/DOUBLE register-homed regions (unlocking DOUBLE OSR for webforai's scoreBlocks scoring loop) and adds an exact IEEE-754 4×-unrolled Float32Array/Float64Array MAC inner-loop prefix for affine.
    • Admits ToConcatKey, GetIndexConcat, ArrayFrom, collection constructors, spread calls, and StrConcat into Tier-C / JIT helper lanes; wires emit_cross3_dyn_stub into region_mem calls; adds inline megamorphic class getter/setter dispatch and widens class_member_cache (mixing w1, longer inline keys, and class-only GC invalidation).
    • Eliminates unconditional array_snapshot clones in find/findIndex/some/every/findLast/reduce/forEach, avoids redundant subject clones and per-match Vec<u8> allocations in regex_replace, adds replaceAll / match / split fast paths, and enables Set/Map/String iteration in jit_get_iterator/jit_iter_next.
    • Adds a 2048-slot VM static_append_shape_cache for object literals, pooled well-formed string concatenation (concat_wellformed_in_buf), Closure/PyAttrs slot recycling in Heap::free_slot, fast-pathed ASCII toUpperCase, fast WeakMap/WeakSet proven lanes + FxHashMap/FxHashSet ephemeron GC tracing, and faster closure capture resolution.
  • Python VM, JIT & Runtime Throughput:
    • Raises PyAttrs DEPTH_MAX from 64 to 128 so large stateful instances (such as html2text.HTML2Text with 84 fields) stay in layout-mode PyAttrs without spilling to PyTable.
    • Routes hot Python object allocations (seq, inst, exc, dict, slice, frame) through 'static OnceLock<StaticKeyPlan> ready-object pools, and caches STR_HAS_SURROGATE in JsStr::memo_state so BMP Unicode strings stay O(1) without O(N²) rescan cliffs.
    • Adds native PyTable hashing/equality and native subscripting/len/truth for unmodified str and tuple subclasses (bs4.NavigableString, soupsieve NamedTuples), collapses redundant cold subscript_get misses, and ensures strictly non-allocating ASCII indexing in py_get_item.
    • Adds fused PyTruth (with an inline x86-64 fast path for bool/None/small int), non-allocating PyGetAttr/PySetAttr fast-hit prefixes, dict-less no_dict support in py_method/py_attr_get (__slots__/NamedTuple), fast py_cls_of slot checks, memchr + single-borrow array scan in py_in, native py_re spans, exception construction fast paths, and expanded PY_STRM / isinstance tuple / ord / format / collections.deque fast paths.
  • Regex (regress-fork), WebAssembly / safe-sandbox, Compiler & PHP/Rust Runtimes:
    • Improves regress-fork start-predicate extraction (zero-width assertions, Node::Char, optional leading loops, lookbehinds, anchored alternations), adds UTF-16 unit_may_start prefiltering, and reuses MatchAttempter scratch buffers.
    • Re-enables pure-safe interpreter IC hit paths, metered superinstructions, safe capture.rs memoization, faster to_js_bounded JSON marshalling, and expanded regex caching in zipp-wasm / safe-sandbox (preserving zero unsafe and the audited 51-function WASM import surface).
    • Linearizes compile/string_accum.rs, deduplicates ESM specifier resolution, and replaces O(N²) array/map operations in the PHP and Rust runtimes with O(1) ring buffers and cached cursors.
  • Dependency Maintenance (#111, #112, #113):
    • Updates regex (1.13.1 → 1.13.2), pollster (1.0.1 → 1.0.3), and @cloudflare/vite-plugin (1.69.1 → 1.70.1 in landing/).

Downloads

File What it is
zipp-0.0.40-windows-x86_64-portable.exe The Windows command line; run it from anywhere.
zipp-0.0.40-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.40-linux-x86_64 The Linux command line, x86-64 (glibc 2.35 or later). chmod +x it after downloading.
zipp-0.0.40-linux-arm64 The same for 64-bit Arm.
zipp-0.0.40-linux-armv7 The same for 32-bit Arm (hard float); interpreter only, and WebAssembly on wasmi.
zipp-0.0.40-javascript.wasm The JavaScript engine for browsers, Node, Deno and Bun.
zipp-0.0.40-javascript-typescript.wasm The same with TypeScript and TSX.
zipp-0.0.40-javascript-lite.wasm The JavaScript core without Intl and Temporal, built for size.
zipp-0.0.40-javascript-python.wasm JavaScript and Python, torch built in.
zipp-0.0.40-javascript-python-base.wasm JavaScript and Python without torch.
zipp-0.0.40-javascript-php.wasm JavaScript and PHP 8.x, with PhpApp SAPI and SQL bridge support.
zipp-0.0.40-javascript-rust.wasm JavaScript and Rust, with Axum/SQLx worker-boot support.
zipp-0.0.40-torch-package.wasm The torch package for the -python-base engine.
zipp-0.0.40-<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.40-wasm-embed-kit.zip zipp.mjs (the loader and sandbox, version 1.5.0) and its types, the host SDK (1.4.0), the engine's TypeScript declarations, the browser GPU adapter, docs and examples.
SHA256SUMS Checksums of every file.

Verification

  • All release binaries, WebAssembly variants, and the embed kit are built and verified from the tagged commit in release.yml and release-build.yml.
  • Every WebAssembly engine module retains the audited 51-function host import surface (plus zippTorchKernel on Python builds) and the 1 GiB linear memory cap.

Full Changelog: v0.0.39...v0.0.40