Just in time compilation (JIT) in Python - Peter9192/MAQ_PhD GitHub Wiki

Just-in-time compilation (JIT) in Python

Gerbrand Koren, 8 Feb 2017

Just-in-time (JIT) compilation in Python can be used to speed up code (see MAQ_PhD/code/Pyhton for a JIT demo)

Advantages of JIT:

  • does not require users to explicitly perform compilation step before execution (keeping the flexibility of an interpreted language)
  • possible speed up of code by simply adding the decorator @jit before a heavy loop

JIT can be imported from the numba package (which is part of the Anaconda distribution). The speed up that can be achieved by using JIT is different for each code.