[Numpy-discussion] Speed degression?

Arnd Baecker arnd.baecker at web.de
Thu Jul 6 08:36:11 CDT 2006


On Thu, 6 Jul 2006, Travis Oliphant wrote:

> Arnd Baecker wrote:
> > Hi
> >>> i made some speed tests using the sin-function and the %-operation to compare
> >>> Numeric, numpy 0.9.8 and numpy 0.9.9.2732.
> >>> As result the latest numpy version seems to be very slow in comparison to the
> >>> two other candidates.
> >>>
>
> Arrgggh.
>
> It looks like a pre-mature return statement was causing scalarmath not
> to load and therefore none of it's speed ups are present  until this SVN.
>
> Thanks for the speed test...

Well, the thanks for this go to Steffen (who wrote the text above and the
test, not me ;-).

Concerning the speed the thanks go to you:

Results (in usec per loop):
                                     sin-array            mod-array
 Numeric                                34                  7
 numpy 0.9.9.2732                       56                 92
 numpy 0.9.9.2732 + math                42
 Numeric + math                          8

*and now*

Results (in usec per loop):
                                     sin-array            mod-array
 Numeric                                33                  7
 numpy 0.9.9.2749                       30                 17.6
 numpy 0.9.9.2749 + math                13
 Numeric + math                          8


Bingo! Only numpy 0.9.9.2749 + math  is slower than
Numeric+math by a factor 1.6 and mod-array is 2.5 times slower
than numpy.
It would be nice if you could have a look at the module operation,
if possible ...

Many thanks,

Arnd




More information about the Numpy-discussion mailing list