6 ms·
It's due to the decompression algorithm, gzip gets better file sizes and is a better general solution. lz4 is usually 10% worse but will get vastly better decom
by faizshah 11y ago
It's due to the decompression algorithm, gzip gets better file sizes and is a better general solution. lz4 is usually 10% worse but will get vastly better decompression speeds. The I/O of an SSD is usually 300+MBps, lz4 will usually be around 270MBps, gzip will usually be <80MBps.
lz4 will put less load on your cpu allowing you to get more throughput from your processing tasks. But I agree most people don't reach these bottlenecks because most people use tools which are not optimized for performance like using jackson or jq instead of boon or rapidjson.
Look here for a reproducible test I ran on real data: https://news.ycombinator.com/item?id=10721645 https://news.ycombinator.com/item?id=10721645
- mattbillenstein 11y agoCool -- good stuff. Those compressors should arguably be more widely supported.
- faizshah 11y agoI agree, disk is cheap it's compute that's expensive. One thing to note though is that lz4 will use a lot more RAM relative to gzip but compared to processing tasks it's not much.