inikep / lzbench

lzbench is an in-memory benchmark of open-source LZ77/LZSS/LZMA compressors
893 stars 181 forks source link

ZSTD Levels #68

Open indolering opened 4 years ago

indolering commented 4 years ago

ZSTD expanded their range of compression levels to include negative integers. The current "max" (-5) pushes it into LZ4 territory. I would make a pull request, but I'm not sure how many additional levels you want to test by default.

inikep commented 4 years ago

Currently -eall uses zstd,1,2,5,8,11,15,18,22. I would add -1, -3, -5 but it depends if there is a big difference in speed/ratio between these levels.

indolering commented 4 years ago

Currently -eall uses zstd,1,2,5,8,11,15,18,22.

Why those breakpoints? #3 is the default speed and #19 is the highest before you have to add the --ultra flag....

I would add -1, -3, -5 but it depends if there is a big difference in speed/ratio between these levels

Fast mode beats Snappy and LZO on all counts, while -4 and -5 makes it competitive with LZ4. From the ZSTD 1.3.4 release notes:

name ratio compression decompression
zstd 1.3.4 --fast=5 1.996 770 MB/s 2060 MB/s
lz4 1.8.1 2.101 750 MB/s 3700 MB/s
zstd 1.3.4 --fast=4 2.068 720 MB/s 2000 MB/s
zstd 1.3.4 --fast=3 2.153 675 MB/s 1930 MB/s
lzo1x 2.09 -1 2.108 640 MB/s 810 MB/s
zstd 1.3.4 --fast=2 2.265 610 MB/s 1830 MB/s
snappy 1.1.4 2.091 530 MB/s 1820 MB/s
zstd 1.3.4 --fast=1 2.431 530 MB/s 1770 MB/s