# Wasmz upgrades to Zig 0.17.1

> Source: <https://ziggit.dev/t/wasmz-upgrades-to-zig-0-17-1/18571#post_1>
> Published: 2026-11-24 02:58:38+00:00

**Key takeaway:** Upgrading Wasmz from Zig 0.16.0 to Zig 0.17.1 (LLVM 22.1.8) cut fib(30) time 5.7% to 19.8 ms and QuickJS fib(25) 2.3% to 133.5 ms at roughly flat memory, for a 17.2 KB (+1.9%) binary-size cost.

A few months ago, I shared the Wasm interpreter I developed and raised the performance regression that occurred after upgrading from Zig 0.15.2 to 0.16.

The conclusion is that under Zig 0.17.1, Wasmz’s computational performance has improved, thanks to code generation from LLVM 22.1.8.

The upgrade from 0.15.2 to 0.16 was led by a human with LLM assistance, while this upgrade was handled entirely by Gemini4 Carbon, with human review.

This is not a complaint, but the many small tasks involved in each version upgrade are too burdensome for the human brain, though well suited for LLM processing.

Currently I’m porting Wasmz to the ESP32-C3 and exposing hardware functionality as a Wasm interface, so that Zig only needs to be compiled to Wasm in order to run on the ESP32.

Wish me luck.

```
Ran check bench/results and measure Avg RSS for report
Ran measure true direct-process Avg RSS for wasmz

# wasmz Performance Report (Zig 0.16.0 → Zig 0.17.1)

**Date:** 2026-11-24  
**Target Runtime:** wasmz (`ReleaseFast` / `fast`)  
**Platform:** Darwin 27.3.0 arm64 (macOS 27.3, Apple M4, 32 GB RAM)

## Binary Size

| Zig Version | Size | Change |
|---|---:|---:|
| 0.16.0 | 891.5 KB | — |
| 0.17.1 | 908.8 KB | +17.2 KB (+1.9%) |

---

# Execution Time Comparison

Lower is better.

## fib(30) — pure C compiled to WASM

| Zig Version | Median | Stddev | Change |
|---|---:|---:|---:|
| 0.16.0 | 21.0 ms | ±0.6 | — |
| 0.17.1 | 19.8 ms | ±3.4 | -1.2 ms (-5.7%) |

## QuickJS fib(25)

| Zig Version | Median | Stddev | Change |
|---|---:|---:|---:|
| 0.16.0 | 136.6 ms | ±1.6 | — |
| 0.17.1 | 133.5 ms | ±1.5 | -3.1 ms (-2.3%) |

## esbuild bundling

| Zig Version | Median | Stddev | Change |
|---|---:|---:|---:|
| 0.16.0 | 942.2 ms | ±10.0 | — |
| 0.17.1 | 932.4 ms | ±8.4 | -9.9 ms (-1.1%) |

---

# Memory Usage Comparison

Lower is better.

## fib(30)

| Zig Version | Peak RSS | Avg RSS | Peak Change | Avg Change |
|---|---:|---:|---:|---:|
| 0.16.0 | 18.9 MB | 6.9 MB | — | — |
| 0.17.1 | 19.0 MB | 6.9 MB | +0.1 MB (+0.2%) | ~0% |

## QuickJS fib(25)

| Zig Version | Peak RSS | Avg RSS | Peak Change | Avg Change |
|---|---:|---:|---:|---:|
| 0.16.0 | 7.0 MB | 5.2 MB | — | — |
| 0.17.1 | 7.0 MB | 5.2 MB | ~0% (-0.4%) | ~0% (-1.2%) |

## esbuild bundling

| Zig Version | Peak RSS | Avg RSS | Peak Change | Avg Change |
|---|---:|---:|---:|---:|
| 0.16.0 | 107.4 MB | 57.3 MB | — | — |
| 0.17.1 | 107.3 MB | 56.4 MB | -0.1 MB (-0.1%) | -0.9 MB (-1.6%) |
```

This upgrade’s code was entirely written by Gemini 4 Carbon, with human review.
