From: Travis O. <oli...@ie...> - 2006-08-23 19:59:31
|
Charles R Harris wrote: > Yes, > > On 8/19/06, Joris De Ridder <jo...@st... > <mailto:jo...@st...>> wrote: > > Hi, > > > > Some of my code is heavily using large complex arrays, and I noticed > a speed > > degression in NumPy 1.0b2 with respect to Numarray. The following > code snippet > > is an example that on my computer runs 10% faster in Numarray than > in NumPy. > > > > >>> A = zeros(1000000, complex) > > >>> for k in range(1000): > > ... A *= zeros(1000000, complex) > > > > (I replaced 'complex' with 'Complex' in Numarray). Can anyone > confirm this? > The multiply (and divide functions) for complex arrays were using the "generic interface" (probably because this is what Numeric did) which calls out to a function to compute each result. I just committed a switch to "in-line" the multiplication and division calls. The speed-up is about that 10%. Now, my numarray and NumPy versions of the test are very similar. -Travis |