Simple example
Numpy is calculating both the eigenvectors and eigenvalues, so it will take roughly twice longer, which is consistent with your slowdown (use np.linalg.eigvals
to compute only the eigenvalues).
In the end, np.linalg.eig
is a tiny wrapper around dgeev, and likely the same thing happens in Matlab, which is using MKL.
To get virtually the same speed in linear algebra, you could build Numpy against MKL or OpenBLAS. There are some commercial offers (maybe free for academics) from Continuum or Enthought. You could also get MKL and build Numpy yourself.
Real-world example
4x slower seems like too much (I have rewritten some Matlab code in Numpy and both programs performed in a very similar way). Take into account that recent Matlab versions come with a simple JIT, so loops aren't as bad as in the usual Python implementation. If you're doing many FFT, you could benefit from using a FFTW wrapper (pyFFTW seems nice, but I haven't used it).