A1.4 Translation (HL) - IB Diploma Class 11 Computer Science Notes, Diagrams and Solved Questions
HL only. How compilers and interpreters turn source code into something a CPU can run, how they differ in errors, speed and portability, how bytecode and the JVM work, what just-in-time compilation does, and how to choose a translator for a task.
In this chapter
Why high-level code must be translated into machine code
How a compiler works and what it produces
How an interpreter works and when it finds errors
Compilers and interpreters compared: errors, translation time, speed, portability
Bytecode, the Java Virtual Machine and Python bytecode
Just-in-time compilation of hot spots
Choosing an approach for rapid testing, performance or cross-platform delivery
Iteration 3: break-even timing models, JIT warm-up and when errors are detected