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. -- BSD Podcasts @: http://bsdtalk.blogspot.com/ http://freebsdforall.blogspot.com/
"Nikolas Britton" <nikolas.britton@gmail.com> writes:> dd if=/dev/random of=testfile bs=1m count=50001. 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.> gzip compiled with -O3: > # date ; nice -10 ./gzip -c9 testfile > testfile.gz ; date > Wed Aug 9 08:01:21 CDT 2006-- Matthias Andree
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.