News for hackers. Stuff that matters.
Re:Zstandard – Real-time data compression algorithm by morelisp on Sunday September 04, 2022 @04:25PM (#32717336)
The chart on the zstd site doesn't really back that up for lz4.

    zstd 1.4.5 -1        2.884  500 MB/s  1660 MB/s
    zstd 1.4.5 --fast=1  2.434  570 MB/s  2200 MB/s
    zstd 1.4.5 --fast=5  2.178  700 MB/s  2420 MB/s
    lz4 1.9.2            2.101  740 MB/s  4530 MB/s
3% larger size for a nearly 2x decompression speed is a no brainer for lots of uses.

Anecdotally I have also gotten much better decomp speed on snappy on previous generations of CPUs staying within ~10% compression ratio, though I had not benchmarked/tuned extensively nor reconfirmed in the past ~2 years. (Probably this can also vary a lot by implementation, which you're often stuck with based on some other library choice.)

Re:Zstandard – Real-time data compression algorithm by josephg on Sunday September 04, 2022 @10:47PM (#32719955)
The lz4 algorithm is also tiny code-wise. Pulling in a lz4 compressor / decompressor library into my wasm project only added 11kb to the bundled size. Zstd is many times larger.

For my use case, any extra benefits of zstd are far outweighed by the extra cost of downloading zstd itself in the browser.

LZ4 is smaller, faster and much more simple.

Re:Zstandard – Real-time data compression algorithm by adgjlsfhk1 on Sunday September 04, 2022 @06:30PM (#32718358)
this can be a bit misleading because you only get the 2x decompression speed if you aren't bandwidth limited. this means that zstd will almost always be faster over a network.
Re:Zstandard – Real-time data compression algorithm by morelisp on Monday September 05, 2022 @02:24AM (#32721152)
Even if you are bandwidth-limited you can rephrase this as "3% slower for half the CPU usage" which is still a good bargain in a lot of cases.
Re:Zstandard – Real-time data compression algorithm by anonymoushn on Monday September 05, 2022 @03:47AM (#32721601)
A common use of zstd is for zfs, so decode speed matters quite a bit.