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

2013-06-19 Thread David Cournapeau
On Tue, Jun 18, 2013 at 7:26 AM, Nathaniel Smith n...@pobox.com wrote: On 18 Jun 2013 12:40, David Cournapeau courn...@gmail.com wrote: On Mon, Jun 17, 2013 at 4:06 PM, Arink Verma arinkve...@gmail.com wrote: I am building numpy from source, python setup.py build --fcompiler=gnu95

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

2013-06-18 Thread David Cournapeau
On Mon, Jun 17, 2013 at 4:06 PM, Arink Verma arinkve...@gmail.com wrote: I am building numpy from source, python setup.py build --fcompiler=gnu95 then installation, python setup.py install --user, on ubuntu 13.04 for analysis results pprof --svg /usr/bin/python py.prof You can try using

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

2013-06-18 Thread Nathaniel Smith
On 18 Jun 2013 12:40, David Cournapeau courn...@gmail.com wrote: On Mon, Jun 17, 2013 at 4:06 PM, Arink Verma arinkve...@gmail.com wrote: I am building numpy from source, python setup.py build --fcompiler=gnu95 then installation, python setup.py install --user, on ubuntu 13.04 for

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

2013-06-17 Thread Arink Verma
Hi Nathaniel 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

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

2013-06-17 Thread Charles R Harris
On Mon, Jun 17, 2013 at 9:29 AM, Arink Verma arinkve...@gmail.com wrote: Hi Nathaniel 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),

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

2013-06-17 Thread Arink Verma
Not sure what you are profiling. The PyArray_DESCR call just returns a pointer to the descr contained in an ndarray instance, so probably has little relevance here. I am profiling following code timeit.timeit('x+y',number=10,setup='import numpy as np;x = np.asarray(1.0);y =

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

2013-06-17 Thread Nathaniel Smith
On Mon, Jun 17, 2013 at 4:29 PM, Arink Verma arinkve...@gmail.com wrote: Hi Nathaniel 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),

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

2013-06-17 Thread Arink Verma
I am building numpy from source, python setup.py build --fcompiler=gnu95 then installation, python setup.py install --user, on ubuntu 13.04 for analysis results pprof --svg /usr/bin/python py.prof On Mon, Jun 17, 2013 at 10:04 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Jun 17, 2013 at

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

2013-06-14 Thread Nathaniel Smith
On 14 Jun 2013 09:18, Arink Verma arinkve...@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

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

2013-06-10 Thread Nathaniel Smith
On Sat, Jun 8, 2013 at 3:15 AM, Arink Verma arinkve...@gmail.com wrote: I tried to use pprof, but I can not find profiles to be used. like ls.prof in pprof /bin/ls ls.prof You're looking for the ProfilerStart/ProfilerStop functions, the former takes a filename to write the profiler to (like

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

2013-06-07 Thread Arink Verma
I did profiling for $python -m timeit -n 100 -s 'import numpy as np;x = np.asarray(1.0)' 'x+x' with oprofilier, and used gprof2dot.py to create callgraph, but I got graph[1] which doesn't create any meaning. I tried to use pprof, but I can not find profiles to be used. like ls.prof in pprof

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

2013-05-05 Thread David Cournapeau
On Thu, May 2, 2013 at 2:58 PM, Nathaniel Smith n...@pobox.com wrote: On Thu, May 2, 2013 at 9:25 AM, David Cournapeau courn...@gmail.com wrote: * Re: the profiling, I wrote a full oprofile-callgrind format script years ago: http://vorpus.org/~njs/op2calltree.py Haven't used it in years either

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

2013-05-05 Thread Nathaniel Smith
On Sun, May 5, 2013 at 5:57 PM, David Cournapeau courn...@gmail.com wrote: perf is a fabulous framework and doesn't have any way to get full callgraph information out so IME it's been useless. They have reporting modes that claim to (like some fractal thing?) but AFAI been able to tell from

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

2013-05-02 Thread Nathaniel Smith
On Thu, May 2, 2013 at 9:25 AM, David Cournapeau courn...@gmail.com wrote: * Re: the profiling, I wrote a full oprofile-callgrind format script years ago: http://vorpus.org/~njs/op2calltree.py Haven't used it in years either but neither oprofile nor kcachegrind are terribly fast-moving

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

2013-05-02 Thread Francesc Alted
On 5/2/13 3:58 PM, Nathaniel Smith wrote: callgrind has the *fabulous* kcachegrind front-end, but it only measures memory access performance on a simulated machine, which is very useful sometimes (if you're trying to optimize cache locality), but there's no guarantee that the bottlenecks on

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

2013-05-02 Thread Nathaniel Smith
On Thu, May 2, 2013 at 10:51 AM, Francesc Alted franc...@continuum.io wrote: On 5/2/13 3:58 PM, Nathaniel Smith wrote: callgrind has the *fabulous* kcachegrind front-end, but it only measures memory access performance on a simulated machine, which is very useful sometimes (if you're trying to