Re: [Numpy-discussion] vectorizing loops

2007-11-02 Thread Francesc Altet
A Thursday 01 November 2007, Timothy Hochberg escrigué: > On Nov 1, 2007 7:14 AM, David M. Cooke <[EMAIL PROTECTED]> > > Another issue is that numexpr is still in the scipy sandbox, so > > only those who enable it will use it (or use it through PyTables). > > One problem with moving it out is that

Re: [Numpy-discussion] vectorizing loops

2007-11-02 Thread Francesc Altet
A Thursday 01 November 2007, David M. Cooke escrigué: > > At any rate, we would be glad if you would like to integrate our > > patches > > in the main numexpr, as there is not much sense to have different > > implementations of numexpr (most specially when it seems that there > > are > > not much u

Re: [Numpy-discussion] vectorizing loops

2007-11-01 Thread Timothy Hochberg
On Nov 1, 2007 7:14 AM, David M. Cooke <[EMAIL PROTECTED]> wrote: > On Nov 1, 2007, at 08:56 , Francesc Altet wrote: > > > A Wednesday 31 October 2007, Timothy Hochberg escrigué: > >> On Oct 31, 2007 3:18 AM, Francesc Altet <[EMAIL PROTECTED]> wrote: > >> > >> [SNIP] > >> > >>> Incidentally, all t

Re: [Numpy-discussion] vectorizing loops

2007-11-01 Thread David M. Cooke
On Nov 1, 2007, at 08:56 , Francesc Altet wrote: > A Wednesday 31 October 2007, Timothy Hochberg escrigué: >> On Oct 31, 2007 3:18 AM, Francesc Altet <[EMAIL PROTECTED]> wrote: >> >> [SNIP] >> >>> Incidentally, all the improvements of the PyTables flavor of >>> numexpr have been reported to the or

Re: [Numpy-discussion] vectorizing loops

2007-11-01 Thread Francesc Altet
A Wednesday 31 October 2007, Timothy Hochberg escrigué: > On Oct 31, 2007 3:18 AM, Francesc Altet <[EMAIL PROTECTED]> wrote: > > [SNIP] > > > Incidentally, all the improvements of the PyTables flavor of > > numexpr have been reported to the original authors, but, for the > > sake of keeping numexpr

Re: [Numpy-discussion] vectorizing loops

2007-10-31 Thread Timothy Hochberg
On Oct 31, 2007 3:18 AM, Francesc Altet <[EMAIL PROTECTED]> wrote: [SNIP] > Incidentally, all the improvements of the PyTables flavor of numexpr > have been reported to the original authors, but, for the sake of > keeping numexpr simple, they decided to implement only some of them. > However, peo

Re: [Numpy-discussion] vectorizing loops

2007-10-31 Thread Francesc Altet
A Wednesday 31 October 2007, Mathew Yeates escrigué: [...] > I also took a look at NumExpr. While it wasn't something I needed for > vectorizing, it still looks very interesting. What kinds of > performance improvements would be expected using this? Well, for some speedup figures you can always ch

Re: [Numpy-discussion] vectorizing loops

2007-10-30 Thread Mathew Yeates
Thanks all for your suggestions. I see it brought up a lot of interesting asides. But my loop was simple enough that I was able to figure it out. I also took a look at NumExpr. While it wasn't something I needed for vectorizing, it still looks very interesting. What kinds of performance improv

Re: [Numpy-discussion] vectorizing loops

2007-10-29 Thread David Cournapeau
Timothy Hochberg wrote: > > > On 10/29/07, *Christopher Barker* <[EMAIL PROTECTED] > > wrote: > > >> (incidently, the kind of things 'we' are doing seem like the most > > simple things to JIT). > > Wouldn't a numpy-aware psyco be cool then? > > Oh well, I'

Re: [Numpy-discussion] vectorizing loops

2007-10-29 Thread Timothy Hochberg
On 10/29/07, Christopher Barker <[EMAIL PROTECTED]> wrote: > > >> (incidently, the kind of things 'we' are doing seem like the most > > simple things to JIT). > > Wouldn't a numpy-aware psyco be cool then? > > Oh well, I'm not going to write it! > > (though as I think about it, for the special case

Re: [Numpy-discussion] vectorizing loops

2007-10-29 Thread Christopher Barker
>> (incidently, the kind of things 'we' are doing seem like the most > simple things to JIT). Wouldn't a numpy-aware psyco be cool then? Oh well, I'm not going to write it! (though as I think about it, for the special case of a contiguous array, it would be awfully similar to an array.array --

Re: [Numpy-discussion] vectorizing loops

2007-10-28 Thread David Cournapeau
Sebastian Haase wrote: > On 10/26/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > >> P.S: IMHO, this is one of the main limitation of numpy (or any language >> using arrays for speed; and this is really difficult to optimize: you >> need compilation, JIT or similar to solve those efficiently).

Re: [Numpy-discussion] vectorizing loops

2007-10-26 Thread Charles R Harris
Hi, On 10/26/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > > > On 10/26/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > On 10/26/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > > > P.S: IMHO, this is one of the main limitation of numpy (or any language > > > using arrays for speed; and th

Re: [Numpy-discussion] vectorizing loops

2007-10-26 Thread Timothy Hochberg
On 10/26/07, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > On 10/26/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > > P.S: IMHO, this is one of the main limitation of numpy (or any language > > using arrays for speed; and this is really difficult to optimize: you > > need compilation, JIT or sim

Re: [Numpy-discussion] vectorizing loops

2007-10-26 Thread Sebastian Haase
On 10/26/07, David Cournapeau <[EMAIL PROTECTED]> wrote: > P.S: IMHO, this is one of the main limitation of numpy (or any language > using arrays for speed; and this is really difficult to optimize: you > need compilation, JIT or similar to solve those efficiently). This is where the scipy - sandb

Re: [Numpy-discussion] vectorizing loops

2007-10-26 Thread Gael Varoquaux
On Fri, Oct 26, 2007 at 01:56:26AM -0500, Robert Kern wrote: > Gael Varoquaux wrote: > > On Thu, Oct 25, 2007 at 04:16:06PM -0700, Mathew Yeates wrote: > >> Anybody know of any tricks for handling something like > >> z[0]=1.0 > >> for i in range(100): > >> out[i]=func1(z[i]) > >> z[i+1]=fu

Re: [Numpy-discussion] vectorizing loops

2007-10-25 Thread Robert Kern
Gael Varoquaux wrote: > On Thu, Oct 25, 2007 at 04:16:06PM -0700, Mathew Yeates wrote: >> Anybody know of any tricks for handling something like > >> z[0]=1.0 >> for i in range(100): >> out[i]=func1(z[i]) >> z[i+1]=func2(out[i]) > > Something like: > > z[0] = 1. > out = func1(z) > z[1:]

Re: [Numpy-discussion] vectorizing loops

2007-10-25 Thread David Cournapeau
Gael Varoquaux wrote: > On Thu, Oct 25, 2007 at 04:16:06PM -0700, Mathew Yeates wrote: >> Anybody know of any tricks for handling something like > >> z[0]=1.0 >> for i in range(100): >> out[i]=func1(z[i]) >> z[i+1]=func2(out[i]) > > Something like: > > z[0] = 1. > out = func1(z) > z[1:] = f

Re: [Numpy-discussion] vectorizing loops

2007-10-25 Thread Gael Varoquaux
On Thu, Oct 25, 2007 at 04:16:06PM -0700, Mathew Yeates wrote: > Anybody know of any tricks for handling something like > z[0]=1.0 > for i in range(100): > out[i]=func1(z[i]) > z[i+1]=func2(out[i]) Something like: z[0] = 1. out = func1(z) z[1:] = func2(out[:-1]) HTH, Gaël _

[Numpy-discussion] vectorizing loops

2007-10-25 Thread Mathew Yeates
Anybody know of any tricks for handling something like z[0]=1.0 for i in range(100): out[i]=func1(z[i]) z[i+1]=func2(out[i]) ?? ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-di