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