Chinese Yellow Pages | Classifieds | Knowledge | Tax | IME

Compiled lang:

src — compiler –> directly to machine code

Interpreter( python/js) :

src-> bytecode,   run on VM ( a VM load bytecode, and do some switch for each type of bytecode defined.  ( even for a loop, the VM run the same again and again)

normally dynamic type

JIT ( Just-In-Time )

hot code/section:  profiling the bytecode, see which section are hot, also try to type inference

compile hot bytecode to native code during runtime for hot sections

balance startup time vs execution time ( in interperter/VM)

 

Example:

PyPy, Numba

 

Normally use llvm to compile IR to machine code.

 

References:

http://dev.stephendiehl.com/numpile/