README.md
1## Benchmarks
2These benchmarks are written using [Google Benchmark](https://github.com/google/benchmark).
3
4*Repetitions*
5
6To increase the number of times each benchmark iteration is run use:
7
8```
9--benchmark_repetitions=20
10```
11
12*Filters*
13
14To filter out which benchmarks are performed use:
15
16```
17--benchmark_filter="adler32*"
18```
19
20There are two different benchmarks, micro and macro.
21
22### Benchmark benchmark_zlib
23These are microbenchmarks intended to test lower level subfunctions of the library.
24
25Benchmarks include impelementations of:
26 - Adler32
27 - CRC
28 - 256 byte comparisons
29 - SIMD accelerated "slide hash" routine
30
31By default these benchmarks report things on the nanosecond scale and are small enough
32to measure very minute diferences.
33
34### Benchmark benchmark_zlib_apps
35These benchmarks measure applications of zlib as a whole. Currently the only examples
36are PNG encoding and decoding. The PNG encode and decode tests leveraging procedurally
37generated and highly compressible image data.
38
39Additionally, a test called `png_decode_realistic` that will decode any RGB 8 BPP encoded
40set of PNGs in the working directory under a directory named "test_pngs" with files named
41{0..1}.png. If these images do not exist, they will error out and the benchmark will move
42on to the next set of benchmarks.
43
44*benchmark_zlib_apps_alt*
45
46The user can compile a comparison benchmark application linking to any zlib-compatible
47implementation of his or her choosing.
48