Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: What is the best way to compare profiling results before and after a code change?

by perrin (Chancellor)
on Apr 11, 2009 at 20:12 UTC ( [id://757046]=note: print w/replies, xml ) Need Help??


in reply to What is the best way to compare profiling results before and after a code change?

Profiling is not for checking performance, it's for finding bottlenecks. Comparing two profiling runs can tell you if you moved the bottleneck. For checking if performance was improved, you need a benchmark. Most benchmark tests run several times, throw away the lowest and highest outliers, and average the rest.

Replies are listed 'Best First'.
Re^2: What is the best way to compare profiling results before and after a code change?
by ELISHEVA (Prior) on Apr 11, 2009 at 20:40 UTC

    Thank-you for the clarification of terminology and the description of benchmarking practice. I'm interested in how OS-competition related variance affects both profiling and benchmarking.

    The number of times function X is called is, of course, stable from profile run to profile run, but at least in my experience with profiling the ranking of function calls according to time can vary greatly from run to run. For example, in one run a function that was called ~5000 times clocked at 0.016s, ranked 3rd and consumed 10.8% of the time. In another run using the same data, that same function clocked at 0.003s, ranked 4th, and consumed 4.88% of the time. A function that consumes 11% of the time is a potential bottleneck, 5% of time, I'm not so sure.

    Best, beth

      To deal with that, I usually run the thing I'm profiling a few times in order to average out the differences. It's not practical with really large programs, but when possible I'll do 10 runs while recording profile data. That tends to smooth things out.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://757046]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-28 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found