gzip is faster with -O3

[LoN]Kamikaze LoN_Kamikaze at gmx.de
Wed Aug 9 17:18:08 UTC 2006


Nikolas Britton wrote:
> dd if=/dev/random of=testfile bs=1m count=5000
> 
> gzip compiled with -O3:
> # date ; nice -10 ./gzip -c9 testfile > testfile.gz ; date
> Wed Aug  9 08:01:21 CDT 2006
> Wed Aug  9 08:09:06 CDT 2006
> 465 Seconds.
> 
> gzip compiled with -O2:
> # date ; nice -10 ./gzip -c9 testfile > testfile.gz ; date
> Wed Aug  9 08:19:14 CDT 2006
> Wed Aug  9 08:27:06 CDT 2006
> 472 Seconds.
> 
> 7 second difference, it's not much but I still wanted to share it with
> the group.
> 
> 

You should use /bin/time for measuring.


More information about the freebsd-stable mailing list