In my field, signal processing, Matlab is heavily used, and I see Python as becoming a valid competitor, eventually. However, one of the advantages of Matlab is that it has a just-in-time compiler (JIT), making it much faster. Here, I test to see how much faster. I use Python's JIT, Numba, as well, and also include a C file to compare against.

Any file compared is viewable at my GitHub. It's over 800 lines of code, the reason it's not in this notebook. As for overhead, I've tested the notebook GUI out, and there's no added overhead.

This notebook is best viewed at nbviewer.ipython.org.