gzip is faster with -O3

Nikolas Britton nikolas.britton at gmail.com
Wed Aug 9 22:31:59 UTC 2006


On 8/9/06, Matthias Andree <matthias.andree at gmx.de> wrote:
>
> 1. gzip isn't usually used to compress incompressible data.
>
> 2. use "time" to figure out how much CPU time it actually burns.
>    5 GB are somewhat I/O bound, but gcc options don't help with that, so
>    CPU time is better than wallclock time.
>

dd if=/dev/zero of=testfile bs=1m count=5000

gzip comiled with -O3
# time nice -10 ./gzip -c9 testfile > /dev/null
73.187u 8.682s 2:08.41 63.7%    70+617k 40161+0io 0pf+0w

gzip compiled with -O2
# time nice -10 ./gzip -c9 testfile > /dev/null
61.183u 8.468s 2:00.14 57.9%    58+609k 40162+0io 0pf+0w

Now... what do all of those numbers mean, I've never used time
before... thanks for the tip btw?


-- 
BSD Podcasts @:
http://bsdtalk.blogspot.com/
http://freebsdforall.blogspot.com/


More information about the freebsd-stable mailing list