[Numpy-discussion] Profiling numpy ? (parts written in C)
David Cournapeau
david at ar.media.kyoto-u.ac.jp
Wed Dec 20 00:59:50 CST 2006
Francesc Altet wrote:
>
>
>
> So, cProfile is only showing where the time is spent at the
> first-level calls in extension level. If we want more introspection on
> the C stack, and you are running un Linux, oprofile
> (http://oprofile.sourceforge.net) is a very nice profiler. Here are
> the outputs for the above routines on my machine.
>
> For clip1:
>
> Profiling through timer interrupt
> samples % image name symbol name
> 643 54.6769 libc-2.3.6.so memmove
> 151 12.8401 multiarray.so PyArray_Choose
> 35 2.9762 umath.so BYTE_multiply
> 34 2.8912 umath.so DOUBLE_greater
> 32 2.7211 mtrand.so rk_random
> 32 2.7211 umath.so DOUBLE_less
> 30 2.5510 libc-2.3.6.so memcpy
>
>
> For clip2:
>
> Profiling through timer interrupt
> samples % image name symbol name
> 188 24.5111 libc-2.3.6.so memmove
> 143 18.6441 multiarray.so _nonzero_indices
> 126 16.4276 multiarray.so PyArray_MapIterNext
> 37 4.8240 umath.so DOUBLE_greater
> 36 4.6936 mtrand.so rk_gauss
> 33 4.3025 umath.so DOUBLE_less
> 24 3.1291 libc-2.3.6.so memcpy
Could you detail a bit how you did the profiling with oprofile ? I don't
manage to get the same results than you (that is on per application
basis when the application is a python script and not a 'binary' program)
Thank you,
David
More information about the Numpy-discussion
mailing list