inikep / lzbench

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

Update zstd to 1.3.0 #39

Closed cyanate closed 6 years ago

cyanate commented 7 years ago

I've tried to compile with zstd git and got this error:

g++  -Wno-unknown-pragmas -Wno-sign-compare -Wno-conversion -fomit-frame-pointer -fstrict-aliasing -ffast-math -O3 -DNDEBUG -I. -Izstd/lib -Izstd/lib/common -Ixpack/common -Ilibcsc -DHAVE_CONFIG_H _lzbench/compressors.cpp -c -o _lzbench/compressors.o
_lzbench/compressors.cpp: In function 'int64_t lzbench_zstd_compress(char*, size_t, char*, size_t, size_t, size_t, char*)':
_lzbench/compressors.cpp:1771:220: error: 'ZSTD_btopt2' was not declared in this scope
 >zparams.cParams.chainLog = windowLog + ((zstd_params->zparams.cParams.strategy == ZSTD_btlazy2) || (zstd_params->zparams.cParams.strategy == ZSTD_btopt) || (zstd_params->zparams.cParams.strategy == ZSTD_btopt2));
                                                                                                                                                                                                        ^~~~~~~~~~~
_lzbench/compressors.cpp:1771:220: note: suggested alternative: 'ZSTD_btopt'
 >zparams.cParams.chainLog = windowLog + ((zstd_params->zparams.cParams.strategy == ZSTD_btlazy2) || (zstd_params->zparams.cParams.strategy == ZSTD_btopt) || (zstd_params->zparams.cParams.strategy == ZSTD_btopt2));
                                                                                                                                                                                                        ^~~~~~~~~~~
                                                                                                                                                                                                                            ZSTD_btopt
make: *** [Makefile:248: _lzbench/compressors.o] Error 1
Cyan4973 commented 7 years ago

in latest version of zstd, this strategy is now called ZSTD_btultra

tayler1 commented 7 years ago

I am also unable to update it (just removing that code doesn't help), but after quick test against zstd-cli I gave up.

zstd 1.1.4 -1             321 MB/s   779 MB/s    73659092  34.75 silesia
zstd 1.1.4 -2             256 MB/s   718 MB/s    70157863  33.10 silesia
zstd 1.1.4 -3             195 MB/s   702 MB/s    66991947  31.61 silesia

./zstd-1.3.1 -b1 -e3 silesia
1#silesia           : 211938580 ->  73659177 (2.877), 312.2 MB/s , 766.6 MB/s
2#silesia           : 211938580 ->  70158472 (3.021), 249.4 MB/s , 709.5 MB/s
3#silesia           : 211938580 ->  66991943 (3.164), 195.3 MB/s , 694.4 MB/s

May be wrong still results looks the same to me.

inikep commented 7 years ago

The results of 1.1.4 and 1.3.1 should be similar because there was no major speed/ratio improvement.

I updated lzbench with zstd 1.3.1 at https://github.com/inikep/lzbench/commit/a4f47910dd92f0569fb8dae8f051aa2b0d22010e