On this page
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
- tuts/c/compilation_and_internals
- tuts/c/compilation_and_internals/build_pipeline_and_linking
- tuts/cpp/language_and_raii/compilation_headers_modules_and_abi
- tuts/java/jvm_and_openjdk
- tuts/java/jvm_and_openjdk/jvm_classloading_bytecode_and_jit
- tuts/programming/memory_and_execution
- tuts/programming/memory_and_execution/call_stack_and_heap
- tuts/programming/memory_and_execution/compilation_interpretation_and_jit
- tuts/typescript/type_system/type_checking_and_erasure_pipeline
Related notes
- tuts/programming/memory_and_execution Linked here; links to this page; shared tags: #memory, #prog, #programming
- tuts/programming/memory_and_execution/call_stack_and_heap Linked here; links to this page; shared tags: #memory, #prog, #programming
- tuts/cpp/language_and_raii/compilation_headers_modules_and_abi Linked here; links to this page; shared tags: #prog
- tuts/java/jvm_and_openjdk/jvm_classloading_bytecode_and_jit Linked here; links to this page
- tuts/c/compilation_and_internals links to this page; shared tags: #compilers, #prog
- tuts/c/compilation_and_internals/build_pipeline_and_linking links to this page; shared tags: #compilers, #prog
- tuts/java/jvm_and_openjdk links to this page; shared tags: #prog
- tuts/python3/tutorials/advanced_python_internals/memory_management_and_internals Linked here; shared tags: #memory
- tuts/python3/tutorials/advanced_python_internals/foreign_function_interfaces Linked here
- tuts/typescript/type_system/type_checking_and_erasure_pipeline links to this page