Different Python flavors
In the Numba section, we showed you how to use Numba to speed Python code up. To do so, Numba uses a modern compilation engine. It does so by exploiting the C nature of Python. Another project, Cython, does the same—it compiles Python code into C using a somewhat different approach.
A third (or, chronologically, the first) option is PYPY (not to be confused with PYPI)—a totally separate interpreter for the Python language. Compared to Numba and Cython, PYPY does not need any changes to be made in the code itself—all the optimization is done under the hood in the interpreter. While this is convenient, the problem is that PYPY requires some work since it needs a proper installation of Numpa, sklearn, and basically any ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access