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. On the other hand, knowing what is inside the ".loc" would give a good indicator of what is involved timewise. Someone that knows gcc well enough may be able to provide some info on what a .loc does. My best guess would be each .loc involves about 9 instructions or more... to throw the 3 (.loc) values onto the stack, call a routine, test if you want to debug or not, if not, return from the call, clear the stack and continue to the next instruction. If you simply say each instruction takes 1 CPU cycle, that would be 9 extra CPU cycles (to do a debug .loc) for every (maybe) 5 actual prezip instructions, which makes prezip run at 1/3 the speed. Someone that knows what's inside a .loc could help give an idea of penalty. ...and this is only speaking of gcc generated code since other compilers can behave similarly, better, or worse. _______________________________________________ Aspell-devel mailing list Aspell-devel@gnu.org http://lists.gnu.org/mailman/listinfo/aspell-devel