2 ms·
XZ/LZMA2 has the problem that it slows down a lot on incompressible data and can even choke pretty badly on compressible data, which Yann Collet's algorithms (L
by formerly_proven 6y ago
XZ/LZMA2 has the problem that it slows down a lot on incompressible data and can even choke pretty badly on compressible data, which Yann Collet's algorithms (LZ4 and ze standard) don't do nearly as much. This means zstd can be used indiscriminately, while LZMA would frequently need some sort of qualifier to avoid processing incompressible data and the associated loss of performance.
To put some numbers to this, on the machine (>10yo laptop) I'm typing this on:
trivial random .wav file
LZMA ~20 MB/s ~2 MB/s ~1 MB/s
zstd ~500 MB/s ~250 MB/s ~70 MB/s
zlib ~40 MB/s ~13 MB/s ~6 MB/s