Learn Numba
JIT compiler that turns numeric Python and NumPy code into fast machine code
Numba is a just-in-time compiler for Python that uses LLVM to compile functions working on numbers and NumPy arrays into native machine code. Adding a decorator such as @njit to a loop-heavy function often makes it run at C speed, with optional multithreading and custom ufuncs. It is used in scientific computing, simulation and data processing wherever a loop cannot be vectorized cleanly.
Before you start
How deep do you want to go?
1. EssentialsRead and write simple code, do the everyday basics
2. PracticalUse it productively at work, with the usual idioms
3. AdvancedThe less common features, performance and trade-offs
4. ExpertInternals and the edge cases experts know