|
|
|
|
|
by ramchip
1618 days ago
|
|
CPython compiles Python source code to bytecode, but it never compiles the bytecode to machine code. Instead it interprets the bytecode, reading one instruction at a time, and basically calling a giant switch statement that handles every possible opcode. A JIT would compile the bytecode to machine code then run it directly (at least for frequently executed code paths). There is no "switch" anymore. Each bytecode instruction has already been replaced by the corresponding machine code. |
|
Is there any reason why official python doesn't have any JIT option? Would that be too fastidious to develop?