[SciPy-user] How to profile scipy code ?
David Cournapeau
david at ar.media.kyoto-u.ac.jp
Mon May 15 02:40:23 EDT 2006
Hi there,
I was wondering if other people had any insight on how to
efficiently profile scipy code. What I want is simply being able to see
the bottleneck of one algorithm, see if it can be easily improved (using
other algorithms in scipy, or using C extensions, etc...), and see the
impact of the improvement.
Under matlab, the profiler, quite rudimentary, works perfectly for
this task; for people who don't know matlab's profiler, to profile one
script, you simply do
profile on;
function_to_profile()
profile off;
profile report
profile report call creates a html report. The report gives cumulative
time, and you can easily browse to the code of any called function (as
long it is a matlab file, and not a "native" compiled file).
Is there anything like this for python ?
David
More information about the SciPy-User
mailing list