[Numpy-discussion] Slicing slower than matrix multiplication?

David Cournapeau cournape@gmail....
Fri Dec 11 22:14:26 CST 2009

On Fri, Dec 11, 2009 at 10:06 PM, Bruce Southey <bsouthey@gmail.com> wrote:

> Having said that, the more you can vectorize your function, the more
> efficient it will likely be especially with Atlas etc.

One thing to note is that dot uses optimized atlas if available, which
makes it quite faster than equivalent operations you would do using
purely numpy. I doubt that's the reason here, since the arrays are
small, but that's something to keep in mind when performances matter:
use dot wherever possible, it is generally faster than prod/sum,



More information about the NumPy-Discussion mailing list