Compression level 1
Benchmark index · Median overview · ← Level -1 · Level 2 →
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.
| Implementation | Median speed / C ↑ | Median output / C ↓ | Datasets |
|---|---|---|---|
| zstd C | 1.000× | 1.000× | 8 |
| mzstd | 1.380× | 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 · tiny-text · repeated-1m · binary-64k · random-64k · text-1m · random-1m · alice29
empty
Empty input; measures API overhead. Input: 0 bytes.
mzstd speed / C: 11.256×; output: 9 / 9 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, ns | 95% mean interval, ns | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 2,216 | 2,169–2,271 | — | 9 | — | 1.000× |
| mzstd | 196.9 | 191.8–202.7 | — | 9 | — | 11.256× |
tiny-text
44-byte quick-brown-fox sentence. Input: 44 bytes.
mzstd speed / C: 7.708×; output: 53 / 53 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, µs | 95% mean interval, µs | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 2.41 | 2.366–2.465 | 17.41 | 53 | 120.455% | 1.000× |
| mzstd | 0.3127 | 0.2992–0.3274 | 134.20 | 53 | 120.455% | 7.708× |
repeated-1m
1 MiB of repeated a bytes. Input: 1,048,576 bytes.
mzstd speed / C: 2.871×; output: 51 / 51 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, µs | 95% mean interval, µs | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 83.3 | 79.45–87.75 | 12,004.13 | 51 | 0.005% | 1.000× |
| mzstd | 29.02 | 28.67–29.43 | 34,461.55 | 51 | 0.005% | 2.871× |
binary-64k
64 KiB of structured binary bytes: ((i / 16) XOR i) modulo 256. Input: 65,536 bytes.
mzstd speed / C: 1.501×; output: 2,537 / 2,537 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, µs | 95% mean interval, µs | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 10.72 | 10.61–10.86 | 5,829.12 | 2,537 | 3.871% | 1.000× |
| mzstd | 7.143 | 6.886–7.438 | 8,750.08 | 2,537 | 3.871% | 1.501× |
random-64k
64 KiB prefix of the deterministic pseudorandom corpus. Input: 65,536 bytes.
mzstd speed / C: 1.259×; output: 65,546 / 65,546 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, µs | 95% mean interval, µs | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 8.784 | 8.64–8.964 | 7,115.37 | 65,546 | 100.015% | 1.000× |
| mzstd | 6.979 | 6.796–7.18 | 8,955.37 | 65,546 | 100.015% | 1.259× |
text-1m
Alice text repeated cyclically to 1 MiB. Input: 1,048,576 bytes.
mzstd speed / C: 1.153×; output: 61,206 / 61,206 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, µs | 95% mean interval, µs | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 465.5 | 456.7–474.6 | 2,148.34 | 61,206 | 5.837% | 1.000× |
| mzstd | 403.6 | 390.3–417.6 | 2,477.63 | 61,206 | 5.837% | 1.153× |
random-1m
1 MiB of deterministic xorshift64 pseudorandom bytes. Input: 1,048,576 bytes.
mzstd speed / C: 1.094×; output: 1,048,610 / 1,048,610 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, µs | 95% mean interval, µs | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 85.17 | 84.34–86.05 | 11,741.62 | 1,048,610 | 100.003% | 1.000× |
| mzstd | 77.86 | 77.01–78.81 | 12,843.85 | 1,048,610 | 100.003% | 1.094× |
alice29
Alice in Wonderland text from the Canterbury corpus (testdata/alice29.txt). Input: 152,089 bytes.
mzstd speed / C: 0.993×; output: 59,657 / 59,657 bytes.
Exact measurements and confidence bounds
| Implementation | Mean, µs | 95% mean interval, µs | MiB/s | Output bytes | Output / input | Speed / C |
|---|---|---|---|---|---|---|
| zstd C | 366.9 | 360.8–375.2 | 395.31 | 59,657 | 39.225% | 1.000× |
| mzstd | 369.4 | 360.6–380.4 | 392.62 | 59,657 | 39.225% | 0.993× |