[Numpy-discussion] performance problem

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Sun Jan 29 05:00:01 CST 2006


Hi Travis, thanks for your incredible quick fixes.

numpy is about 5 times slower than numarray (on my numarray-friendly bi-pentium):

>>> from timeit import Timer
>>> import numarray; print numarray.__version__
1.5.0
>>> import numpy; print numpy.__version__
0.9.5.2021
>>> t1 = Timer('a <<= 8', 'import numarray as NX; a = NX.ones(10**6, NX.UInt32)')
>>> t2 = Timer('a <<= 8', 'import numpy as NX; a = NX.ones(10**6, NX.UInt32)')
>>> t1.timeit(100)
0.21813011169433594
>>> t2.timeit(100)
1.1523458957672119
>>>

Numeric-23.1 is about as fast as numarray for inplace left shifts.

Gerard




More information about the Numpy-discussion mailing list