Stage 3 · Lesson 6 of 9
Compiled vs interpreted code
The CPU only understands , so something must translate the code you write. A , as used for C++, translates the whole program ahead of time into a native , a file the computer runs directly. It catches many errors before the program runs.
An interpreter instead reads and runs a program as it goes. Most modern languages mix the two. Java and C# compile to bytecode, a middle form that a runs.
That machine also compiles the bytecode to machine code on the fly, which is called just-in-time (JIT) compiling. CPython compiles to bytecode for its interpreter. compile frequently run code while the program runs.
The practical differences are when errors appear, how fast code starts and runs, and what must be installed to run it.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CourseFreeCS50: Introduction to Computer Science
Harvard University · Beginner
Weeks 0, 1, 2 and 4 teach C, arrays and memory; the difficulty is the point
- VideoFreeCrash Course Computer Science
CrashCourse · Beginner
Short free videos from logic gates to operating systems; episodes 1 to 20
Keep handy
Also worth your time
- What Happens WhenGo deeper
Everything from a key press to a rendered page; read it after this stage