[Numpy-discussion] NumPy EIG much slower than MATLAB EIG

David Cournapeau cournape@gmail....
Mon Apr 2 08:47:25 CDT 2012

On Sun, Apr 1, 2012 at 2:28 PM, Kamesh Krishnamurthy <kameshkk@gmail.com>wrote:

> Hello all,
> I profiled NumPy EIG and MATLAB EIG on the same Macbook pro, and both were
> linking to the Accelerate framework BLAS. NumPy turns out to be ~4x slower.
> I've posted details on Stackoverflow:
> http://stackoverflow.com/q/9955021/974568
> Can someone please let me know the reason for the performance gap?

I would look at two things:

   - first, are you sure matlab is not using the MKL instead of accelerate
framework ? I have not used matlab in ages, but you should be able to check
by using otool -L to some of the core dll of matlab, to find out which
libraries are linked to it
   - second, it could be that matlab eig and numpy eig don't use the same
underlying lapack API (do they give you the same result ?). This would
already be a bit harder to check, unless it is documented explicitly in


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120402/4f4f692e/attachment.html 

More information about the NumPy-Discussion mailing list