y******e 发帖数: 7 | 1 【 以下文字转载自 Programming 讨论区 】
【 原文由 yjlspace 所发表 】
要求具有这样的功能:能统计程序中每个programming entity被调用的次数
programming entity可以由用户定义。可以是class,procedure,甚至single instruction | q***e 发帖数: 90 | 2 Try gprof. Could achieve most of your demand
【在 y******e 的大作中提到】 : 【 以下文字转载自 Programming 讨论区 】 : 【 原文由 yjlspace 所发表 】 : 要求具有这样的功能:能统计程序中每个programming entity被调用的次数 : programming entity可以由用户定义。可以是class,procedure,甚至single instruction
| t******q 发帖数: 117 | 3 only routines can be profiled by gprof.
instruction | q***e 发帖数: 90 | 4 You'd better add NOT to your statements! Missing
such an important word is misleading if not cheating!
The fact is that "NOT only routines can be profiled by
gprof", it implies that
"BUT ALSO something else could be profiled by gprof".
The something else includes at least "line by line
profiling", "block counting" etc.
I could hardly understand why you are saying like
that. Don't omit important words like "NOT" in your
statements if you did not intend to mislead the reader!!!
I gue
【在 t******q 的大作中提到】 : only routines can be profiled by gprof. : instruction
| c*****t 发帖数: 1879 | 5 Unfortunately, it does not list the speed of each line, which
is more important..
【在 q***e 的大作中提到】 : You'd better add NOT to your statements! Missing : such an important word is misleading if not cheating! : The fact is that "NOT only routines can be profiled by : gprof", it implies that : "BUT ALSO something else could be profiled by gprof". : The something else includes at least "line by line : profiling", "block counting" etc. : I could hardly understand why you are saying like : that. Don't omit important words like "NOT" in your : statements if you did not intend to mislead the reader!!!
| q***e 发帖数: 90 | 6 The purpose of profiling is to give people
some guide where to focus for optimization, to find
the performance bottleneck. So
if optimization could be done more efficiently
without profiling, It will be pointless to profile
anything.
I don't think "the speed of each line" is
important or "more important" at all. If a line
of code is executed only once and is not the bottle
neck, who cares how much time it takes. On the
other hand, if a piece of code is executed millions
of times. T
【在 c*****t 的大作中提到】 : Unfortunately, it does not list the speed of each line, which : is more important..
| c*****t 发帖数: 1879 | 7 Well, if you were trying to improve the speed of
a function that would be executed 1 million times,
each line of the code can save significantly over all.
Unfortunately, line profiling is rather difficult and
few tools could do that. For some programs, to speed
up things and reduce function calls, a large function
may exist. Line-by-line profiling is even more important.
【在 q***e 的大作中提到】 : The purpose of profiling is to give people : some guide where to focus for optimization, to find : the performance bottleneck. So : if optimization could be done more efficiently : without profiling, It will be pointless to profile : anything. : I don't think "the speed of each line" is : important or "more important" at all. If a line : of code is executed only once and is not the bottle : neck, who cares how much time it takes. On the
|
|