On Thu, Aug 8, 2013 at 8:00 PM, Jonathan Katz <jon at jonworld.com> wrote:
I guess that's what you're looking for?
I tried a 2nd time compiling with -O3 for more optimization.... cuts
the time down somewhat..
sgi 33# cc -o foo -O3 ./foo.c
sgi 34# rm output.txt
sgi 35# time ./foo > output.txt
37.6u 0.2s 0:37 99%
sgi 36# wc -l output.txt
250000 output.txt
One more test, writing to /dev/null which would be faster than writing
to SCSI-I disks...
sgi 37# time ./foo > /dev/null
37.5u 0.1s 0:37 100%
Only .1s of a difference; I thought it would be larger. Now for the
non-optimized executable...
sgi 39# time ./foo.no-opt > /dev/null
56.9u 0.2s 0:57 99%
a .2 second difference in CPU time.
--
-Jon
Jonathan Katz, Indianapolis, IN.