由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - How to count how much time used for a program
相关主题
delete sheets from Excel workbook in C# (转载)accurate C++ timer
c里面有什么函数可以如何测试程序的execution time vs memory stall time (ratio)
测试某进程耗用内存的最好办法?a very good article about count bit
a template counting - anybody understand this?GPROF problem
How to detect overflow in C?GO game terminal condition
fork(): why both if and else are executed?Solaris shell problem, HELP me !!!!
求教一个perl问题c++ typedef 一问
GO似乎是目前最难反编译的代码了请问一下,用什么语言/库/脚本作GUI比较方便?
相关话题的讨论汇总
话题: time话题: count话题: much话题: program
进入Programming版参与讨论
1 (共1页)
q*d
发帖数: 20
1
suppose I want to compare two functions performance,
Is there any function I can use from g++ to count the time?
Thanks very much!
k****f
发帖数: 3794
2
getrusage
gprof

【在 q*d 的大作中提到】
: suppose I want to compare two functions performance,
: Is there any function I can use from g++ to count the time?
: Thanks very much!

q*d
发帖数: 20
3
Thanks very much!
It seems to me getrusage and gprof are very fancy to me. I am wondering
whether there is any basic function like counting the time from line i
to line k:
int i ; ..... .line i
...
...
int j; ...... line k
Thanks again!

【在 k****f 的大作中提到】
: getrusage
: gprof

k****f
发帖数: 3794
4
被gcc优化之后,行的顺序就不一定了
最好去统计一个函数的时间

【在 q*d 的大作中提到】
: Thanks very much!
: It seems to me getrusage and gprof are very fancy to me. I am wondering
: whether there is any basic function like counting the time from line i
: to line k:
: int i ; ..... .line i
: ...
: ...
: int j; ...... line k
: Thanks again!

x*****h
发帖数: 38
5
Try the time utility in linux
time + executable code

【在 q*d 的大作中提到】
: suppose I want to compare two functions performance,
: Is there any function I can use from g++ to count the time?
: Thanks very much!

g****c
发帖数: 299
6
time is just one aspect of performance factors.
performance library like PAPI or PCL will give you all statistic data of the
performance you need.

【在 q*d 的大作中提到】
: suppose I want to compare two functions performance,
: Is there any function I can use from g++ to count the time?
: Thanks very much!

1 (共1页)
进入Programming版参与讨论
相关主题
请问一下,用什么语言/库/脚本作GUI比较方便?How to detect overflow in C?
C++ questionsfork(): why both if and else are executed?
Questions about MAKEFILE求教一个perl问题
一个非常有难度的问题GO似乎是目前最难反编译的代码了
delete sheets from Excel workbook in C# (转载)accurate C++ timer
c里面有什么函数可以如何测试程序的execution time vs memory stall time (ratio)
测试某进程耗用内存的最好办法?a very good article about count bit
a template counting - anybody understand this?GPROF problem
相关话题的讨论汇总
话题: time话题: count话题: much话题: program