Apex › Systems & OS

How a JIT makes code fast

The sequel to the bytecode VM: interpreting is portable but slow, so V8, the JVM, and PyPy compile the hot parts to native code while the program runs. A narrated walk through profiling to find hot loops, compiling and type-specializing them, swapping in the fast version, and deoptimizing when an assumption breaks. Run a loop, watch it cross the threshold and get ~50× faster, then break a type and watch it fall back.

More in Systems & OS