adam@eggsbenedict ~/scratch/zlib-ng/build/test/benchmarks $ setarch `uname -m` -R taskset -c 0 python ./compare.py -a benchmarksfiltered ./benchmark_zlib_old inflate_corpora ./benchmark_zlib inflate_corpora --benchmark_repetitions=10
RUNNING: ./benchmark_zlib_old --benchmark_repetitions=10 --benchmark_display_aggregates_only=true --benchmark_filter=inflate_corpora --benchmark_out=/tmp/tmp4kubc631
2026-07-03T11:24:39-04:00
Running ./benchmark_zlib_old
Run on (28 X 4100 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x14)
L1 Instruction 32 KiB (x14)
L2 Unified 1024 KiB (x14)
adam@g5box ~/zlib-ng/build-zlibrs-bench/test/benchmarks $ setarch `uname -m` -R taskset -c 0 python ./compare.py -a benchmarksfiltered ./benchmark_zlib_rs deflate_corpora ./benchmark_zlib deflate_corpora --benchmark_repetitions=10
RUNNING: ./benchmark_zlib_rs --benchmark_repetitions=10 --benchmark_display_aggregates_only=true --benchmark_filter=deflate_corpora --benchmark_out=/tmp/tmpkqxl4n8x
2026-06-28T21:04:47-04:00
Running ./benchmark_zlib_rs
Run on (4 X 2500 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x4)
L1 Instruction 64 KiB (x4)
L2 Unified 1024 KiB (x4)
adam@g5box ~/zlib-ng/build-zlibrs-bench/test/benchmarks $ cat /proc/cpuinfo
processor : 0
cpu : PPC970MP, altivec supported
clock : 2500.000000MHz
revision : 1.1 (pvr 0044 0101)
processor : 1
cpu : PPC970MP, altivec supported
clock : 2500.000000MHz
Comparing deflate_corpora (from ./benchmark_zlib_rs) to deflate_corpora (from ./benchmark_zlib)
Benchmark Time CPU Time Old Time New CPU Old CPU New
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[deflate_corpora vs. deflate_corpora]/artificial/a.txt/level:1_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10
[deflate_corpora vs. deflate_corpora]/artificial/a.txt/level:1_mean -0.4909 -0.4909 3635 1851 3635 1851
[deflate_corpora vs. deflate_corpora]/artificial/a.txt/level:1_median -0.4512 -0.4512 3329 1827 3329 1827
[deflate_corpora vs. deflate_corpora]/artificial/a.txt/level:1_st
adam@eggsbenedict ~/scratch/zlib-ng/build/test/benchmarks $ setarch `uname -m` -R taskset -c 0 ./benchmark_zlib --benchmark_filter=deflate_corpora --benchmark_repetitions=10 --benchmark_report_aggregates_only
2026-06-27T15:43:42-04:00
Running ./benchmark_zlib
Run on (28 X 4100 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x14)
L1 Instruction 32 KiB (x14)
L2 Unified 1024 KiB (x14)
L3 Unified 19712 KiB (x1)
adam@eggsbenedict ~/scratch/zlib-ng/build/test/benchmarks $ setarch `uname -m` -R taskset -c 0 python ./compare.py -a benchmarksfiltered ./benchmark_zlib_rs deflate_corpora ./benchmark_zlib deflate_corpora --benchmark_repetitions=10
RUNNING: ./benchmark_zlib_rs --benchmark_repetitions=10 --benchmark_display_aggregates_only=true --benchmark_filter=deflate_corpora --benchmark_out=/tmp/tmp_necc4gu
2026-06-27T11:40:59-04:00
Running ./benchmark_zlib_rs
Run on (28 X 4099.99 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x14)
L1 Instruction 32 KiB (x14)
L2 Unified 1024 KiB (x14)
These are my attempts at an honest benchmark comparison using real data. We leverage our own internal google benchmark based harness with our test corpora.
The comparisons that are blogged about writ large tend to be against the latest release tag. Zlib-ng has made some serious advancements in performance since the last release that hasn't been captured. The benchmarks provided by the zlib-rs project to date have seem to also have come from relaunching the benchmark binary over and over as well, which can capture a fair bit of variance from the system calls ingesting the files. These benchmarks attempt to capture the raw inflate time after we initialize our test harness. The microbenchmark framework of google bench lends itself well to baking things into steady state behavior.
This particular test machine's CPU is:
processor : 0
vendor_id : GenuineIntel
| Comparing png_decode_re (from ./benchmark_zlib_apps_old) to png_decode_re (from ./benchmark_zlib_apps) | |
| Benchmark Time CPU Time Old Time New CPU Old CPU New | |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| [png_decode_re vs. png_decode_re]alistic/[png_decode_re vs. png_decode_re]alistic/0_pvalue 0.0036 0.0036 U Test, Repetitions: 10 vs 10 | |
| [png_decode_re vs. png_decode_re]alistic/[png_decode_re vs. png_decode_re]alistic/0_mean -0.0063 -0.0063 9637 9576 9637 9576 | |
| [png_decode_re vs. png_decode_re]alistic/[png_decode_re vs. png_decode_re]alistic/0_median -0.0074 -0.0074 9641 9569 9640 9569 | |
| [png_decode_ |
| RUNNING: ./benchmark_zlib_apps_alt --benchmark_repetitions=10 --benchmark_display_aggregates_only=true --benchmark_filter=png_decode_re --benchmark_out=/tmp/tmpi2ugdndb | |
| 2022-08-24T13:28:49-04:00 | |
| Running ./benchmark_zlib_apps_alt | |
| Run on (28 X 2508.39 MHz CPU s) | |
| CPU Caches: | |
| L1 Data 32 KiB (x14) | |
| L1 Instruction 32 KiB (x14) | |
| L2 Unified 1024 KiB (x14) | |
| L3 Unified 19712 KiB (x1) | |
| Load Average: 0.71, 0.54, 0.37 |
| RUNNING: ./benchmark_zlib_apps_alt --benchmark_repetitions=10 --benchmark_display_aggregates_only=true --benchmark_filter=png_decode/ --benchmark_out=/tmp/tmpz15lkbmi | |
| 2022-08-24T13:23:32-04:00 | |
| Running ./benchmark_zlib_apps_alt | |
| Run on (28 X 4097.68 MHz CPU s) | |
| CPU Caches: | |
| L1 Data 32 KiB (x14) | |
| L1 Instruction 32 KiB (x14) | |
| L2 Unified 1024 KiB (x14) | |
| L3 Unified 19712 KiB (x1) | |
| Load Average: 0.56, 0.29, 0.22 |