40.2 Numba
The Numba project aims to provide an easy-to-use JIT compiler for numeric Python code. Numba is not a separate interpreter, like PyPy, but a module that provides tools to accelerate Python programs. In particular, it includes a function decorator[ 194 ] that translates the decorated function completely or partially into the C or CUDA programming language and then executes it directly on the CPU or the GPU. This allows Numba to execute certain types of functions considerably faster in some cases.
The Numba JIT compiler is most suitable for the accelerated execution of numerical calculations. In simplified terms, this refers to code that consists of mathematical calculations and loop constructs. More complex language elements and ...
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