Profiling pypy code

I've been trying to find ways to optimize my clojure-on-python project. And I've been running through my code in jitviewer. However it seems that jitviewer only displays the number of times a given loop was run. What should I look into for benchmarking actual times spent in each loop? It seems that my optimization efforts would be best spent on areas of code that have a high hit count AND have a long execution time. Any ideas? Thanks, Timothy -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth)

Hi Timothy, On Wed, Mar 28, 2012 at 16:35, Timothy Baldridge <tbaldridge@gmail.com> wrote:
What should I look into for benchmarking actual times spent in each loop?
As a first approximation, getting only the execution counts is enough. Basically the work flow is: pick one of the most often executed loops, look into it, and be scared by the amount of cruft left --- calls to RPython functions, notably. Then try to remove them. Getting the execution times is not very useful at first, because the typical execution counts are not flat at all: often, the first few loops are run 100's or 1000's of times more often than all the others. At least it is so when looking at the interpreter running small examples. A bientôt, Armin.

Hi Timothy, On Wed, Mar 28, 2012 at 16:35, Timothy Baldridge <tbaldridge@gmail.com> wrote:
What should I look into for benchmarking actual times spent in each loop?
As a first approximation, getting only the execution counts is enough. Basically the work flow is: pick one of the most often executed loops, look into it, and be scared by the amount of cruft left --- calls to RPython functions, notably. Then try to remove them. Getting the execution times is not very useful at first, because the typical execution counts are not flat at all: often, the first few loops are run 100's or 1000's of times more often than all the others. At least it is so when looking at the interpreter running small examples. A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Timothy Baldridge