Many of us who depend on Python a great deal these days know it’s quite easy to make it run faster without having to change code at all. Sound too good to be true? What’s the catch?
The catch is this: You need to be using relatively recent (within the last five years) x86/x86-64 processors, and your Python code needs to lean on NumPy or SciPy or scikit-learn or mpi4py.
If that’s the case, you really should try Tip #1. If not, skip to Tip #2, which can help everyone but isn’t quite as magical.
Tip #1: Download and install the Intel Distribution for Python. It’s actually quite painless, quick, and easy to do; it’s also completely free, and it doesn’t require any code changes to use it. This takes nothing more than a few moments of your time, which you’ll easily get back in the form of faster Python execution if you do much with Python. This biggest tune-up of all is to simply install the Intel Distribution for Python to power either Python 2.7 or Python 3.6 code. You can do this on Linux, Windows, or macOS, and you can use conda or pip package management. If you are an Anaconda user, you can simply set up an Intel channel (conda config –add channels intel) and bring in the Python you want (see instructions in a blog from Intel titled Installing Intel Distribution for Python and Intel Performance Libraries with Anaconda.
To read this article in full, please click here