[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why I am happy to dump gzip for xz

From: Jim Meyering
Subject: Re: Why I am happy to dump gzip for xz
Date: Tue, 06 Mar 2012 18:03:43 +0100

Mike Frysinger wrote:
> On Tuesday 06 March 2012 04:57:27 Jim Meyering wrote:
>> Why I am happy to dump gzip for xz:
>>   - xz decompresses more quickly
> is that true ?  i thought last i looked, they were close, but gzip was
> consistently slightly faster.  maybe if the bottleneck is more I/O than
> CPU/memory, xz would win ?

Hi Mike,

Even back when the program was named lzma, it was always
much more efficient at decompressing than *bzip2*:
(this is on a tmpfs file system)

  $ du -sh gcc-*
  69M     gcc-4.6.3.tar.bz2
  90M     gcc-4.6.3.tar.gz
  52M     gcc-4.6.3.tar.xz

Here xz decompression speed is about triple than bzip2:

  $ env time xz -dc gcc-4.6.3.tar.xz > /dev/null
  3.76user 0.04system 0:03.82elapsed 99%CPU (0avgtext+0avgdata 
  0inputs+0outputs (0major+850minor)pagefaults 0swaps

  $ env time bzip2 -dc gcc-4.6.3.tar.bz2.orig > /dev/null
  12.11user 0.04system 0:12.21elapsed 99%CPU (0avgtext+0avgdata 
  88inputs+0outputs (0major+573minor)pagefaults 0swaps

However, you're right that gzip decompresses faster than xz:

  $ env time gzip -dc gcc-4.6.3.tar.gz > /dev/null
  2.31user 0.03system 0:02.35elapsed 99%CPU (0avgtext+0avgdata 772maxresident)k
  0inputs+0outputs (0major+235minor)pagefaults 0swaps

Thanks for the correction.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]