Blog 2020/7/7 (retroactively posted on 2020/7/10)
<- previous | index | next ->
In preparation for writing Janet bindings for LZO,
I took a look at how lzop behaves at various compression levels (-1
through -9
).
To do this, I wrote a simple Janet script called zbench.
Because lzop is so fast, I ran this script on the slowest hardware I had on hand (a 266MHz NSLU2) to exaggerate any differences. For reference, I've also included gzip results.
The results:
Remarks:
lzop -1
throughlzop -6
are the samelzop -7
is slower thangzip -9
, with ratio equivalent togzip -3
- if you need more compression than
lzop -6
,gzip -1
has a significantly better ratio at the cost of 3x the run time. gzip
past-6
shows almost no improvement on ratio
I could think of only the following use-cases for lzop -7
through lzop -9
:
- lzop is required by the system
- decompression speed trumps every other concern
- you have zero memory available for decompression (e.g. a microcontroller)
So, at least for the use-base of compressing Linux source code, these are points of interest:
lzop -1
through-6
gzip -1
gzip -6
lzop -9