Skip to content

Commit 7b0391f

Browse files
committed
Update doc/benchmarks.md for other Deflate impls
1 parent b92ea03 commit 7b0391f

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

doc/benchmarks.md

+57
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,63 @@ is unset or set.
148148
mimic_deflate_decode_100k_many_big_reads 256MB/s 1.00x
149149

150150

151+
## Deflate (C, miniz)
152+
153+
For comparison, here are [miniz](https://github.com/richgel999/miniz) 2.1.0's
154+
numbers.
155+
156+
name speed vs_mimic
157+
158+
miniz_deflate_decode_1k/clang8 174MB/s 0.80x
159+
miniz_deflate_decode_10k/clang8 245MB/s 0.91x
160+
miniz_deflate_decode_100k_just_one_read/clang8 309MB/s 0.94x
161+
162+
miniz_deflate_decode_1k/gcc9 158MB/s 0.73x
163+
miniz_deflate_decode_10k/gcc9 221MB/s 0.82x
164+
miniz_deflate_decode_100k_just_one_read/gcc9 250MB/s 0.76x
165+
166+
To reproduce these numbers, look in `test/c/mimiclib/deflate-gzip-zlib.c`.
167+
168+
169+
## Deflate (Go)
170+
171+
For comparison, here are Go 1.12.10's numbers, using Go's standard library's
172+
`compress/flate` package.
173+
174+
name speed vs_mimic
175+
176+
go_deflate_decode_1k 45.4MB/s 0.21x
177+
go_deflate_decode_10k 82.5MB/s 0.31x
178+
go_deflate_decode_100k 94.0MB/s 0.29x
179+
180+
To reproduce these numbers:
181+
182+
git clone https://github.com/google/wuffs.git
183+
cd wuffs/script/bench-go-deflate/
184+
go run main.go
185+
186+
187+
## Deflate (Rust)
188+
189+
For comparison, here are Rust 1.37.0's numbers, using the
190+
[alexcrichton/flate2-rs](https://github.com/alexcrichton/flate2-rs) and
191+
[Frommi/miniz_oxide](https://github.com/Frommi/miniz_oxide) crates, which [this
192+
file](https://github.com/sile/libflate/blob/77a1004edf6518a0badab7ce8837bc5338ff9bc3/README.md#an-informal-benchmark)
193+
suggests is the fastest pure-Rust Deflate decoder.
194+
195+
name speed vs_mimic
196+
197+
rust_deflate_decode_1k 104MB/s 0.48x
198+
rust_deflate_decode_10k 202MB/s 0.75x
199+
rust_deflate_decode_100k 218MB/s 0.66x
200+
201+
To reproduce these numbers:
202+
203+
git clone https://github.com/google/wuffs.git
204+
cd wuffs/script/bench-rust-deflate/
205+
cargo run --release
206+
207+
151208
# GIF
152209

153210
The `1k`, `10k`, etc. numbers are approximately how many pixels there are in

0 commit comments

Comments
 (0)