找回密码
 注册
查看: 2624|回复: 0

optimizing the code

[复制链接]
发表于 2007-11-10 06:29:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
[这个贴子最后由newcfd在 2007/11/10 06:35am 第 1 次编辑]

In order to optimize the code, people need to know  where the code uses most CPU time.
gprof can be used to find that out. Steps to use it:
1. add  option  -pg to  CFLAGS, CXXFLAGS and LINK  in make file
2. make clean and recompile your code
3. run your code(for example solver)  and you will get  a file gmon.out
4.  type command "gprof solver | less"   to see the info
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表