LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   benchmarking my code (https://www.linuxquestions.org/questions/programming-9/benchmarking-my-code-231262/)

spuzzzzzzz 09-16-2004 05:01 AM

benchmarking my code
 
Is there a good program that will test my code for the most executed bits? I want to do some optimisation but I'd like to find out which parts of the program are slowing it down the most so I can concentrate on those parts.
TIA

rjlee 09-16-2004 05:44 AM

I assume you're using gcc/g++, in which case you may want to look at gprof, which is a part of the gcc package I think. You'll need to compile your binaries with profiling support (see the gcc/g++/gprof manpages).

If you do a search for gprof on www.freshmeat.net, you'll see several graphical front-ends to help you analyse the results.

spuzzzzzzz 09-16-2004 06:01 AM

That seems to be what I'm looking for. Thanks a lot!


All times are GMT -5. The time now is 03:18 AM.