Is MATLAB faster than Python?

You might find some useful results at the bottom of this link

http://wiki.scipy.org/PerformancePython

From the introduction,

A comparison of weave with NumPy, Pyrex, Psyco, Fortran (77 and 90) and C++ for solving Laplace’s equation.

It also compares MATLAB and seems to show similar speeds to when using Python and NumPy.

Of course this is only a specific example, your application might be allow better or worse performance. There is no harm in running the same test on both and comparing.

You can also compile NumPy with optimized libraries such as ATLAS which provides some BLAS/LAPACK routines. These should be of comparable speed to MATLAB.

I’m not sure if the NumPy downloads are already built against it, but I think ATLAS will tune libraries to your system if you compile NumPy,

http://www.scipy.org/Installing_SciPy/Windows

The link has more details on what is required under the Windows platform.

EDIT:

If you want to find out what performs better, C or C++, it might be worth asking a new question. Although from the link above C++ has best performance. Other solutions are quite close too i.e. Pyrex, Python/Fortran (using f2py) and inline C++.

The only matrix algebra under C++ I have ever done was using MTL and implementing an Extended Kalman Filter. I guess, though, in essence it depends on the libraries you are using LAPACK/BLAS and how well optimised it is.

This link has a list of object-oriented numerical packages for many languages.

http://www.oonumerics.org/oon/

Leave a Comment