On June 1, 2008 03:46:16 pm Kevin Atkinson wrote:
On Sun, 1 Jun 2008, Jose Da Silva wrote:
This should shed some light on the subject using a self-contained
program. platform=linux, compiler = gcc, program=prezip.c
$ time ./prezip_asserted -c <wordlist.txt >wordlist.cwl
0.06user 0.00system 0:00.08elapsed 84%CPU (0avgtext+0avgdata
0maxresident)k 0inputs+0outputs (0major+132minor)pagefaults 0swaps
$ time ./prezip_debugged -c <wordlist.txt >wordlist.cwl
0.07user 0.00system 0:00.09elapsed 82%CPU (0avgtext+0avgdata
0maxresident)k 0inputs+0outputs (0major+132minor)pagefaults 0swaps
This test needs to run several times in order for the results to be
meaningful.
The test above spends an unknown amount of time in the program (in prezip),
and outside the program (file handling, passing values through stdin and
stdout). The stuff like stdin/stdout outside of prezip is basically
outside of your control and therefore not something you can tweak for
performance or debugging etc. I don't think you can get any significant
info running the test several times.