[Numpy-discussion] performance matrix multiplication vs. matlab
Thu Jun 4 09:02:03 CDT 2009
Have a look at this thread:
The speed difference is probably due to the fact that the matrix
multiplication does not call optimized an optimized blas routine, e.g.
the ATLAS blas.
On Thu, Jun 4, 2009 at 3:36 PM, David Paul Reichert
> Hi all,
> I would be glad if someone could help me with
> the following issue:
> From what I've read on the web it appears to me
> that numpy should be about as fast as matlab. However,
> when I do simple matrix multiplication, it consistently
> appears to be about 5 times slower. I tested this using
> A = 0.9 * numpy.matlib.ones((500,100))
> B = 0.8 * numpy.matlib.ones((500,100))
> def test():
> for i in range(1000):
> I also used ten times larger matrices with ten times less
> iterations, used xrange instead of range, arrays instead
> of matrices, and tested it on two different machines,
> and the result always seems to be the same.
> Any idea what could go wrong? I'm using ipython and
> matlab R2008b.
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> Numpy-discussion mailing list
More information about the Numpy-discussion