DEV Community

Cover image for 3.24x zstd decode speed at the same ratio: misa77
frank chu
frank chu

Posted on

3.24x zstd decode speed at the same ratio: misa77

misa77 level 13 decodes at 2,633 MB/s on Silesia where zstd -22 manages 813 MB/s — 3.24x the decode speed at essentially the same compressed size (24.82% vs 24.67% of original). The Show HN headline said "up to 3x faster decompression than zstd, with better ratios," so I recomputed the project's own published benchmark table at matched ratios instead of taking the headline's word for it.

Full disclosure up front: I did not build or rerun misa77. This is an audit of the numbers in its README — lzbench results on an Intel i7-14650HX with turbo disabled, single-threaded, pinned to one performance core. If those inputs are wrong, my ratios are wrong in the same direction. What I can verify is whether the claim survives matched-ratio comparison, which is where compression marketing usually dies.

Matched ratios, not matched level numbers

Comparing "level 13" to "level 13" is meaningless across codecs. I paired each misa77 level with the zstd/LZ4 level that lands closest on compressed size:

pairs = [
    # name, misa decode, other decode, misa ratio%, other ratio%, misa encode, other encode
    ("ec-11 vs zstd-11", 2445, 976, 27.38, 27.35, 33.1, 26.7),
    ("ec-12 vs zstd-15", 2496, 997, 25.83, 26.83, 5.81, 6.86),
    ("ec-13 vs zstd-19", 2633, 870, 24.82, 24.93, 1.39, 2.32),
    ("ec-13 vs zstd-22", 2633, 813, 24.82, 24.67, 1.39, 1.51),
    ("misa-3 vs lz4",     5909, 2551, 42.59, 47.32, 71.9, 383),
    ("misa-6 vs lz4hc-12",5334, 2563, 32.34, 36.45, 1.79, 7.80),
]
for name, md, od, mr, orr, me, oe in pairs:
    print(name, f"decode {md/od:.2f}x", f"size {mr} vs {orr}", f"encode {me/oe:.2f}x")
Enter fullscreen mode Exit fullscreen mode
ec-11 vs zstd-11     decode 2.51x   size 27.38 vs 27.35   encode 1.24x
ec-12 vs zstd-15     decode 2.50x   size 25.83 vs 26.83   encode 0.85x
ec-13 vs zstd-19     decode 3.03x   size 24.82 vs 24.93   encode 0.60x
ec-13 vs zstd-22     decode 3.24x   size 24.82 vs 24.67   encode 0.92x
misa-3 vs lz4        decode 2.32x   size 42.59 vs 47.32   encode 0.19x
misa-6 vs lz4hc-12   decode 2.08x   size 32.34 vs 36.45   encode 0.23x
Enter fullscreen mode Exit fullscreen mode

The claim holds, and in one place it undersells itself. Level 11 is the interesting row: same size as zstd -11 to within 0.03 percentage points, 2.51x the decode speed, and it encodes faster too (33.1 vs 26.7 MB/s). The usual trade — decode speed bought with encode pain — only really bites in the LZ4-class levels 1–6, where misa77-3 encodes at 0.19x LZ4's speed. That is a 5.3x encode tax for 2.32x decode and a 10% smaller file.

The second corpus agrees

On the author's game-asset corpus (263 MB, whole-file), level 13 vs zstd -22 is 2,279 vs 590 MB/s decode — 3.86x — at a smaller size, 32.67% vs 34.81%. Level 3 vs LZ4 there is 1.91x decode at nearly identical size (53.83% vs 54.24%). Two corpora, same shape: the entropy-coded levels 11–13 are where the design pays off, because zstd's decode ceiling around 800–1,000 MB/s is apparently not a law of physics.

Where I would and would not use it

misa77 is explicit about its niche: write-once, read-many. Game assets, model weights, dataset snapshots, anything compressed in CI and decompressed on every launch. In that niche, encode speed is a build-time line item and decode speed is user-facing latency, so trading 5x encode for 2–3x decode is often correct.

I would not put a 0.9.0 codec with a brand-new format in a long-lived archive or a wire protocol yet. The README guarantees graceful termination on corrupt input, which is the right promise, but format stability and independent implementations are what make a codec safe to depend on, and those take time, not benchmarks. zstd's real moat was never its ratio table; it is that everything already speaks it.

Caveats: single machine, single-threaded, author's own harness and corpora, Silesia is old and small by modern standards, and I verified arithmetic, not the underlying measurements. The matched-ratio structure is sound; whether 2,633 MB/s reproduces on your hardware is a measurement I have not made.

Sources

Top comments (0)