Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-30 Thread David Verelst
Just want to point to some excellent material that was recently presented at the course Advanced Scientific Programming in Pythonat St Andrews. Day 3 was titled "The Quest for Speed" (see https://python.g-node.org/wiki/schedule) and might interest you as well. Rega

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-29 Thread Keith Hughitt
Ah. Thanks for catching that! Otherwise though I think everything looks pretty good. Thanks all, Keith On Thu, Sep 29, 2011 at 12:18 PM, Zachary Pincus wrote: > I think the remaining delta between the integer and float "boxcar" > smoothing is that the integer version (test 21) still uses median

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-29 Thread Zachary Pincus
I think the remaining delta between the integer and float "boxcar" smoothing is that the integer version (test 21) still uses median_filter(), while the float one (test 22) is using uniform_filter(), which is a boxcar. Other than that and the slow roll() implementation in numpy, things look pret

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Olivier Delalleau
One minor thing is you should use xrange rather than range. Although it will probably only make a difference for the empty loop ;) Otherwise, from what I can see, tests where numpy is really much worse are: - 1, 2, 3, 15, 18: Not numpy but Python related: for loops are not efficient - 6, 10: Maybe

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Nathaniel Smith
On Mon, Sep 26, 2011 at 8:24 AM, Zachary Pincus wrote: > Test 3: >    #Test 3 - Add 20 scalar ints >    nrep = 200 * scale_factor >    for i in range(nrep): >        a = i + 1 > > well, python looping is slow... one doesn't do such loops in idiomatic code > if the underlying intent can be

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Zachary Pincus
Hello Keith, While I also echo Johann's points about the arbitrariness and non-utility of benchmarking I'll briefly comment just on just a few tests to help out with getting things into idiomatic python/numpy: Tests 1 and 2 are fairly pointless (empty for loop and empty procedure) that won't a

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Charles R Harris
On Mon, Sep 26, 2011 at 8:19 AM, Keith Hughitt wrote: > Hi all, > > Myself and several colleagues have recently started work on a Python > library for solar physics , in order to provide an > alternative to the current mainstay for solar > physics

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Peter
On Mon, Sep 26, 2011 at 3:19 PM, Keith Hughitt wrote: > Hi all, > Myself and several colleagues have recently started work on a Python library > for solar physics, in order to provide an alternative to the current > mainstay for solar physics, which is written in IDL. > One of the first steps we h

Re: [Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Johann Cohen-Tanugi
hi Keith, I do not think that your primary concern should be with this kind of speed test at this stage : 1/ rest assured that this sort of tests have been performed in other contexts, and you can always do some hard work on high level computing languages like IDL and python to improve perform

[Numpy-discussion] Comparing NumPy/IDL Performance

2011-09-26 Thread Keith Hughitt
Hi all, Myself and several colleagues have recently started work on a Python library for solar physics , in order to provide an alternative to the current mainstay for solar physics, which is written in IDL. One of the first steps we have ta