Benchmarks
----------
-For comparison, several fast compression algorithms were tested and compared
-on a server running Linux Debian (`Linux version 4.14.0-3-amd64`),
-with a Core i7-6700K CPU @ 4.0GHz,
+For reference, several fast compression algorithms were tested and compared
+on a server running Arch Linux (`Linux version 5.5.11-arch1-1`),
+with a Core i9-9900K CPU @ 5.0GHz,
using [lzbench], an open-source in-memory benchmark by @inikep
-compiled with [gcc] 7.3.0,
+compiled with [gcc] 9.3.0,
on the [Silesia compression corpus].
[lzbench]: https://github.com/inikep/lzbench
| Compressor name | Ratio | Compression| Decompress.|
| --------------- | ------| -----------| ---------- |
-| **zstd 1.3.4 -1** | 2.877 | 470 MB/s | 1380 MB/s |
-| zlib 1.2.11 -1 | 2.743 | 110 MB/s | 400 MB/s |
-| brotli 1.0.2 -0 | 2.701 | 410 MB/s | 430 MB/s |
-| quicklz 1.5.0 -1 | 2.238 | 550 MB/s | 710 MB/s |
-| lzo1x 2.09 -1 | 2.108 | 650 MB/s | 830 MB/s |
-| lz4 1.8.1 | 2.101 | 750 MB/s | 3700 MB/s |
-| snappy 1.1.4 | 2.091 | 530 MB/s | 1800 MB/s |
-| lzf 3.6 -1 | 2.077 | 400 MB/s | 860 MB/s |
+| **zstd 1.4.5 -1** | 2.884 | 500 MB/s | 1660 MB/s |
+| [zlib] 1.2.11 -1 | 2.743 | 90 MB/s | 400 MB/s |
+| brotli 1.0.7 -0 | 2.703 | 400 MB/s | 450 MB/s |
+| **zstd 1.4.5 --fast=1** | 2.434 | 570 MB/s | 2200 MB/s |
+| **zstd 1.4.5 --fast=3** | 2.312 | 640 MB/s | 2300 MB/s |
+| quicklz 1.5.0 -1 | 2.238 | 560 MB/s | 710 MB/s |
+| **zstd 1.4.5 --fast=5** | 2.178 | 700 MB/s | 2420 MB/s |
+| lzo1x 2.10 -1 | 2.106 | 690 MB/s | 820 MB/s |
+| [lz4] 1.9.2 | 2.101 | 740 MB/s | 4530 MB/s |
+| lzf 3.6 -1 | 2.077 | 410 MB/s | 860 MB/s |
+| snappy 1.1.8 | 2.073 | 560 MB/s | 1790 MB/s |
[zlib]:http://www.zlib.net/
-[LZ4]: http://www.lz4.org/
+[lz4]: http://www.lz4.org/
+
+The negative compression levels, specified with `--fast=#`,
+offer faster compression and decompression speed in exchange for some loss in
+compression ratio compared to level 1, as seen in the table above.
Zstd can trade compression speed for stronger compression ratios.
It is configurable by small increment.
| Compression Speed vs Ratio | Decompression Speed |
| ---------------------------|-------------------- |
-| <img src="https://raw.githubusercontent.com/facebook/zstd/dev/doc/images/CSpeed2.png" alt="Compression Speed vs Ratio" style="height:500px;"> | <img src="https://raw.githubusercontent.com/facebook/zstd/dev/doc/images/DSpeed3.png" alt="Decompression Speed" style="height:500px;">
+| <img src="https://raw.githubusercontent.com/facebook/zstd/v1.3.4/doc/images/CSpeed2.png" alt="Compression Speed vs Ratio" style="height:500px;"> | <img src="https://raw.githubusercontent.com/facebook/zstd/v1.3.4/doc/images/DSpeed3.png" alt="Decompression Speed" style="height:500px;">
Several algorithms can produce higher compression ratio but at slower speed, falling outside of the graph.
For a larger picture including very slow modes, [click on this link](https://raw.githubusercontent.com/facebook/zstd/master/doc/images/DCspeed5.png) .