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

Benchmark results

Current library comparison — 2026-10-30

Full serial sweeps on the AMD Ryzen 9 7950X Linux VDS compare five encoders (432 cases) and four decoders (384 cases). Both use ordinary release builds, 20 samples, 1 s warmup and 3 s requested measurement per case, one process at a time on logical CPU 1. The reports identify the measured checkout and binaries.

CompareResultsData
Compression speed and sizeQualities 0–11CSV, conditions, sizes
Decompression of identical C streamsSource qualities 0–11CSV, conditions, sizes

Compression

Across all 96 corpus/quality pairs, mbrotli’s median speed / C is 1.099×; its mean latency is lower in 67/96 cases. Burli supports q0–q5 and the other encoders q0–q11. Each plotted value is a median of eight per-dataset ratios to C. Higher speed and lower output size are better. Equal numeric quality does not imply equal compressed size.

Decompression

Across all 96 corpus/quality pairs, mbrotli’s median speed is 2.588× C and 1.006× Burli. Its mean latency is lower in 80/96 C comparisons and 53/96 Burli comparisons. All decoders restore the same C-produced bytes; quality belongs to their source encoder. SIMD Brotli shares the Rust Brotli decoder project and is omitted. Throughput counts restored bytes.

How to interpret the results

Generic mode, window 22, cold native APIs: construction, allocation, transformation and disposal are timed. Inputs and complete matrices are validated before timing. Empty and tiny inputs carry the same weight as large inputs. Medians describe this corpus, not a production workload distribution; point counts do not imply statistical significance. Confidence bounds and every workload remain in the quality pages. Fixed implementation order and an uncontrolled virtual host can affect timings beyond sampling uncertainty. No build, test, fuzzing or other benchmark ran concurrently with either sweep.

DatasetInput bytesContent
empty0API overhead without input
tiny-text44Quick-brown-fox sentence
alice29152,089Vendored Alice in Wonderland text
text-1m1,048,576Alice repeated cyclically
binary-64k65,536Structured binary bytes
random-64k65,536Prefix of the pseudorandom corpus
random-1m1,048,576Deterministic xorshift64 bytes
repeated-1m1,048,576Repeated a bytes

Use benchmarking and profiling for reproduction and page/chart generation. Root API suites separately measure reuse, streaming, slices, parallel tasks and dictionaries; their results are not mixed into these native-API medians. Superseded local reports and intermediate snapshots have been removed from the published result set.

lzbench — 2026-11-08

lzbench master a6fa8aa (2.4.1), gcc 15.2 with -march=native, silesia.tar on one vCPU of the AMD Ryzen 9 7950X VDS: mbrotli 0.5.20 compresses 41% and 54% faster than Google Brotli 1.2.0 at qualities 8 and 11 and 10% faster at 5, within run-to-run noise at 0 and 2, and decompresses 22–31% faster at every quality. Sizes match at 0–8; at 11 mbrotli’s output is 0.031% larger. Command, environment and raw output.

lzbench (independent)

lzbench is a long-running open-source in-memory benchmark: every codec is built from source into one binary with the same compiler and flags and runs on the same data and machine. Its maintainer ran these results, not us: lzbench 2.4 (gcc 15.2), the 211 MB Silesia corpus, one thread of an AMD EPYC 9555P with turbo disabled. Full table.

mbrotli 0.5.2 against Google Brotli 1.2.0; bold marks the faster result. Ratio is the compressed size as a percentage of the input and matches for both.

LevelCompress mbrotliCompress brotliDecompress mbrotliDecompress brotliRatio, %
-110.67 MB/s0.56 MB/s371 MB/s383 MB/s23.78
-814.4 MB/s12.6 MB/s419 MB/s443 MB/s26.96
-550.0 MB/s53.3 MB/s388 MB/s419 MB/s28.10
-2127 MB/s139 MB/s349 MB/s378 MB/s32.12
-0341 MB/s341 MB/s291 MB/s322 MB/s37.01

Summary: the same compressed size as Google Brotli (+0.005% at -11), 14–20% faster compression at -8 and -11, within 9% at lower levels, and decompression 3–10% behind C.

This external historical result covers mbrotli 0.5.2 on its maintainer’s host; it is separate from the current local library comparison above.