Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Compression level 21

Benchmark index · Median overview · ← Level 20 · Level 22 →

Recorded run: long-20261109 (2026-11-09). Raw results · Environment · Run analysis.

Median across all datasets

Each of the 8 datasets has equal weight, including empty and tiny input. Speed / C = C mean latency / implementation mean latency; output / C = implementation bytes / C bytes. We take the median of these 8 per-dataset ratios separately for speed and size. 1× matches C; higher speed and lower output are better. These are medians across datasets, not median sample latencies, and do not imply statistical significance.

ImplementationMedian speed / C ↑Median output / C ↓Datasets
zstd C1.000×1.000×8
mzstd1.219×1.000×8
Measurement setup and interpretation

zstd 1.5.7 (the C library built by zstd-ffi) and mzstd at the recorded working tree compress identical bytes at this level. Every frame was checked byte-identical to zstd’s and decoded back to its input before any timing.

These are cold native API measurements: construction, allocation, compression, and disposal. Complete known input; 50 samples, 3 s warmup, at least 6 s measurement. Host: AMD Ryzen 9 7950X, Linux KVM guest with two vCPUs: the encoder suite, then the decoder suite, each in one Criterion process pinned to vCPU 1; nothing else ran in the guest. Other tenants loaded the host: a fixed C decode varied by 8-43% (p10-p90 wall time) through the day, so sampling was lengthened to average over the noise. unset; Cargo release defaults (bench profile), runtime SIMD dispatch (AVX-512 level on this host; the decoder runs its block loops at the AVX2 level).

Chart whiskers and table intervals describe 95% confidence bounds on mean timing. They do not capture all host or allocator variation. Throughput bounds are transformed latency bounds. Output / input is compressed bytes divided by input bytes; smaller is better, and values above 100% mean expansion. For empty input, throughput and output / input are undefined (—). See the run analysis for measurement limitations.

Dataset details

Ordered by mzstd speed / C, highest first; all 8 datasets are shown. This order uses recorded mean latency, not statistical significance. Bars start at zero.

empty · random-1m · tiny-text · binary-64k · repeated-1m · alice29 · random-64k · text-1m

empty

Empty input; measures API overhead. Input: 0 bytes.

mzstd speed / C: 5.362×; output: 9 / 9 bytes.

Exact measurements and confidence bounds
ImplementationMean, ns95% mean interval, nsMiB/sOutput bytesOutput / inputSpeed / C
zstd C2,2562,207–2,312—9—1.000×
mzstd420.7405.3–437.7—9—5.362×

random-1m

1 MiB of deterministic xorshift64 pseudorandom bytes. Input: 1,048,576 bytes.

mzstd speed / C: 1.883×; output: 1,048,609 / 1,048,609 bytes.

Exact measurements and confidence bounds
ImplementationMean, µs95% mean interval, µsMiB/sOutput bytesOutput / inputSpeed / C
zstd C6.008e+045.417e+04–6.646e+0416.641,048,609100.003%1.000×
mzstd3.19e+043.032e+04–3.359e+0431.341,048,609100.003%1.883×

tiny-text

44-byte quick-brown-fox sentence. Input: 44 bytes.

mzstd speed / C: 1.561×; output: 53 / 53 bytes.

Exact measurements and confidence bounds
ImplementationMean, µs95% mean interval, µsMiB/sOutput bytesOutput / inputSpeed / C
zstd C7.9647.69–8.2375.2753120.455%1.000×
mzstd5.1014.871–5.3498.2353120.455%1.561×

binary-64k

64 KiB of structured binary bytes: ((i / 16) XOR i) modulo 256. Input: 65,536 bytes.

mzstd speed / C: 1.220×; output: 1,259 / 1,259 bytes.

Exact measurements and confidence bounds
ImplementationMean, µs95% mean interval, µsMiB/sOutput bytesOutput / inputSpeed / C
zstd C268.2258.7–278.7233.061,2591.921%1.000×
mzstd219.8209.7–231.8284.381,2591.921%1.220×

repeated-1m

1 MiB of repeated a bytes. Input: 1,048,576 bytes.

mzstd speed / C: 1.218×; output: 49 / 49 bytes.

Exact measurements and confidence bounds
ImplementationMean, µs95% mean interval, µsMiB/sOutput bytesOutput / inputSpeed / C
zstd C861.2832.1–8921,161.15490.005%1.000×
mzstd707.2669–750.71,413.98490.005%1.218×

alice29

Alice in Wonderland text from the Canterbury corpus (testdata/alice29.txt). Input: 152,089 bytes.

mzstd speed / C: 1.161×; output: 49,211 / 49,211 bytes.

Exact measurements and confidence bounds
ImplementationMean, µs95% mean interval, µsMiB/sOutput bytesOutput / inputSpeed / C
zstd C3.024e+042.924e+04–3.128e+044.8049,21132.357%1.000×
mzstd2.605e+042.524e+04–2.694e+045.5749,21132.357%1.161×

random-64k

64 KiB prefix of the deterministic pseudorandom corpus. Input: 65,536 bytes.

mzstd speed / C: 1.119×; output: 65,546 / 65,546 bytes.

Exact measurements and confidence bounds
ImplementationMean, µs95% mean interval, µsMiB/sOutput bytesOutput / inputSpeed / C
zstd C2,6352,523–2,75223.7265,546100.015%1.000×
mzstd2,3552,258–2,45926.5465,546100.015%1.119×

text-1m

Alice text repeated cyclically to 1 MiB. Input: 1,048,576 bytes.

mzstd speed / C: 1.080×; output: 49,285 / 49,285 bytes.

Exact measurements and confidence bounds
ImplementationMean, µs95% mean interval, µsMiB/sOutput bytesOutput / inputSpeed / C
zstd C2.894e+042.835e+04–2.96e+0434.5549,2854.700%1.000×
mzstd2.68e+042.598e+04–2.77e+0437.3249,2854.700%1.080×