Re: Devel::SmallProf claims "return 1" needs much time !?



Wolfram Humann <w.c.humann@xxxxxxxx> wrote:
On Apr 30, 6:38=A0pm, xhos...@xxxxxxxxx wrote:

This just seems weird. =A0My 3GHz machine does an if defined test 32
times=

faster, so unless you have an old computer I would say that this casts
doubt on the entire reliability of the SmallProf output.

I think you got somthing wrong here. The profiler runs on the comiled
and optimized code where several source-lines may have become one. If
you look at the "count"-column, you will see that line 110 includes
the time for seek() in the next line.

While I can't rule that out, I've never seen that done in this setting.
I've seen the condition of an elsif reported as if it were the condition of
the preceding if, but I've never seen that type of conflation happen
between the if condition and if block (except when the block contents are
on the same line as the condition). And I can't reproduce it with test
cases.

I assumed the behavior of the count column was simply because $loc is never
defined in the use-case you used, and therefore line 111 is never executed.
But I could be wrong.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
.