Compiler vs interpreter
Two distinct methods for translating human-readable code into machine code: compilers do it all at once before running, while interpreters translate and execute it line-by-line.
What it is
A compiler (used by C++ or Rust) analyzes the entire program and translates it into a highly optimized, standalone executable file before execution. An interpreter (used by Python or JavaScript) translates and executes the code line-by-line in real-time. Compiled code runs much faster but takes longer to build, while interpreted code is easier to rapidly test but executes slower.
When you would use it
You reference this distinction when choosing a language for a new project, balancing the rapid iteration speed of interpreted languages against the raw runtime performance of compiled languages.
Common operations
- Not applicable.
Related terms
Where this is taught
No learning path uses this term yet. Browse the Learning Atlas for guided sequences through related ideas.