[Numpy-discussion] making numpy.dot faster
Fri Oct 3 16:11:58 CDT 2008
Fri, 03 Oct 2008 18:59:02 +0200, Gael Varoquaux wrote:
> I am doing a calculation where one call numpy.dot ends up taking 90% of
> the time (the array is huge: (61373, 500) ).
> Any chance I can make this faster? I would believe BLAS/ATLAS would be
> behind this, but from my quick analysis (ldd on
> numpy/core/multiarray.so) it doesn't seem so. Have I done something
> stupid when building numpy (disclaimer: I am on a system I don't know
> well --Mandriva--, so I could very well have done something stupid).
AFAIK, multiarray.so is never linked against ATLAS. The accelerated dot
implementation is in _dotblas.so, and can be toggled with alterdot/
restoredot (but the ATLAS one should be active by default).
Are your arrays appropriately contiguous? Numpy needs to copy the data if
they are not; though I'm not sure if this could account for what you see.
More information about the Numpy-discussion