[Numpy-discussion] Profiling (was GSoC : Performance parity between numpy arrays and Python scalars)

Nathaniel Smith njs at pobox.com
Fri Jun 14 07:15:09 EDT 2013


On 14 Jun 2013 09:18, "Arink Verma" <arinkverma at gmail.com> wrote:
>
>
>> You're looking for the ProfilerStart/ProfilerStop functions, the
>> former takes a filename to write the profiler to (like "ls.prof" or
>> "x-plus-x.prof"):
>>   http://www.mail-archive.com/numpy-discussion@scipy.org/msg41451.html
>
>
> I followed that and able to get a callgraph[1], but it doesnt contains
all the edges.
>
> [1]
https://docs.google.com/file/d/0B3Pqyp8kuQw0eVM4ajVYLWtfZVU/edit?usp=sharing

It's a probabilistic sampling profiler, so if it doesn't have enough
samples then it can miss things. 227 samples is way way too low. You need
to run the profiled code for longer (a few seconds at least), and if that's
not enough then maybe increase the sampling rate too (though be careful
because setting this too high can also add noise).

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130614/a0baf010/attachment.html>


More information about the NumPy-Discussion mailing list