[Numpy-discussion] numpy vs numeric benchmarks

George Nurser gnurser at googlemail.com
Fri Jun 2 10:16:57 EDT 2006


Yes, using numpy.dot I get 250ms, numpy.matrixmultiply 11.8s.

while a sans-BLAS Numeric.matrixmultiply takes 12s.

The first 100 results from numpy.dot and numpy.matrixmultiply are identical ....

Use dot;)

--George.

On 02/06/06, Filip Wasilewski <filip at ftv.pl> wrote:
> Hi,
>
> It seems that in Numeric the matrixmultiply is alias for dot function,
> which "uses the BLAS optimized routines where possible", as the help()
> says.
>
> In NumPy (0.9.6, not upgraded yet to 0.9.8), the matrixmultiply is a
> function of numpy.core.multiarray, while dot refers to
> numpy.core._dotblas.
>
> On my system the timings and results with numpy.dot are quite similar
> to that with Numeric.matrixmultiply.
>
> So the next question is what's the difference between matrixmultiply and
> dot in NumPy?
>
> Filip
>
>
> > Hello! I've been using numeric for a while, and the recent list traffic
> > prompted me to finally migrate all my old code. On a whim, we were
> > benchmarking numpy vs numeric and have been lead to the conclusion that
> > numpy is at least 50x slower; a 1000x1000 matmul takes 16 sec in numpy
> > but 300 ms in numeric.
>
> > Now, of course, I don't believe this, but I can't figure out what we're
> > doing wrong; I'm not the only person who has looked at this code, so can
> > anyone tell me what we're doing wrong?
>
>
>
>
>
>
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>




More information about the NumPy-Discussion mailing list