3 ms·
JIT can be considered an optimization. If you F12 in your browser you have a javascript REPL, no need to know about JIT or not CPython doesn't have a JIT, it h
by __s 5y ago
JIT can be considered an optimization. If you F12 in your browser you have a javascript REPL, no need to know about JIT or not
CPython doesn't have a JIT, it has an interpreter. So it spends a lot of time in this loop: https://github.com/python/cpython/blob/main/Python/ceval.c https://github.com/python/cpython/blob/main/Python/ceval.c
But you still have a repl with pypy. The downsides of JIT is that compiling bytecode to assembly can take up time (hurting startup performance, but that can be mitigated by not applying jit aggressively) & some programs have very dynamic behavior which the JIT has to eventually give up on (& go back to interpreting) or run off some pathological performance cliff where it takes up a bunch of memory & runs 10x slower than interpreter
Ruby 3 introduced a jit to their reference implementation