optimizing the code
[这个贴子最后由newcfd在 2007/11/10 06:35am 第 1 次编辑]In order to optimize the code, people need to knowwhere the code uses most CPU time.
gprof can be used to find that out. Steps to use it:
1. addoption-pg toCFLAGS, CXXFLAGS and LINKin make file
2. make clean and recompile your code
3. run your code(for example solver)and you will geta file gmon.out
4.type command "gprof solver | less" to see the info
页:
[1]