Chapter 5
- JIT compilers perform compilation at runtime rather than before running the code. This allows a piece of code that is expected to run many times to become more efficient, as recompilation is no longer necessary.
- We use the signature of an
nb.jit
function to specify the data types that the function works with, which allows for further optimization for specific numerical data types. When Numba encounters other, unsupported types, it simply registers them as the genericpyobject
type. - Tracing JIT compilation refers to the process of identifying the most intensive loops in a program, tracing the operations involved, and compiling the corresponding optimized, interpreter-free code. This allows us to actively optimize the most inefficient part of our code.