Just-in-time compilation
Just-in-time compilation (JIT) is a method of executing computer code that involves compilation during program execution rather than before execution, blurring the historical boundary between interpreters and compilers. A JIT compiler dynamically translates bytecode or intermediate representation into native machine code at runtime, often using profiling data to guide optimization decisions. This approach enables languages like Java, C#, and JavaScript to achieve performance competitive with statically compiled languages while retaining platform independence and dynamic features. The technique is central to modern language runtimes including the JVM, CLR, and V8, and represents a fundamental shift in systems design: the compiler is no longer a batch tool but a runtime component that must operate under latency constraints.
JIT compilation is the systems engineer's answer to a philosophical dilemma: how to have the flexibility of interpretation without sacrificing the speed of compilation. The answer — do both, and do them at the same time — is elegant in theory and brutal in practice.