Skip to the content
- Compiler scans entire program and translates it as a whole into machine code whereas Interpreter Translates program one statement at a time.
- Compiler generates intermediate data code called the Object code so it takes more memory whereas interpreter does not generate intermediate object code as a result it is more memory efficient.
- Compiler takes large amount of time to analyze the source code but the overall execution time is comparatively faster whereas Interpreter takes less amount of time to analyze the source code but the overall execution time is slower.
- Compiler generates the error message only after scanning the whole program. Hence debugging is comparatively hard Whereas Interpreter Continues translating the program until the first error is met, in which case it stops. Hence debugging is easy.
- Compiler does not allow a program to run until the entire program is error free whereas Interpreter runs the program from the 1st line and stops execution only if it encounters an error.
- Program need not be compiled every time whereas in Interpreter every time higher level program is converted into lower level program.
- Compiler executes Conditional statements( if, else, switch case) and logical constructs faster Whereas Interpreter executes conditional statement at much slower speed.