On this page
  1. Compilation, Interpretation & JIT
  2. Contents
  3. From Source Code to Running Instructions
  4. AOT Compilation vs. Bytecode VMs vs. JIT

Compilation, Interpretation & JIT

Prev: memory_and_execution | Up: memory_and_execution | Next: Call Stack & Heap
Rel: Python Bytecode & Internals, Python FFI, JVM ClassLoading, Bytecode & HotSpot JIT, C++ Compilation, Modules & ABI
Ref: Wikipedia — Compiler
Tags: #public #prog #programming #memory #compilers


Contents


From Source Code to Running Instructions

Source Text
  -> Lexer (Tokens)
  -> Parser (AST)
  -> Semantic Analysis & Type Checking
  -> Intermediate Representation (IR) + Optimizations
  -> Code Generation (Native Machine Code OR Bytecode)
  -> Linker / Runtime Loader (resolves symbols & shared libraries via ABI)

AOT Compilation vs. Bytecode VMs vs. JIT

Model Examples Startup Peak Speed Trade-off
Ahead-of-Time (AOT) C, C++, Rust, Go Instant Very high Platform-specific binaries; slower edit-compile loop
Bytecode Interpreter CPython, Ruby Fast Moderate Portable, dynamic reflection; dispatch overhead
JIT Compiler V8 (JS), HotSpot (JVM), PyPy Warm-up cost Very high Compiles hot paths using runtime type profiles; higher RAM

Linked from

Related notes