-
Difference between an Interpreter and a Compiler?
almost 8 years ago
-
almost 8 years ago
- Interpreter translates program one statement at a time. Compiler scans the entire program and translates it as a whole into machine code.
- Interpreter takes less amount of time to analyze the source code but the overall execution time is slower. Compiler takes large amount of time to analyze the source code but the overall execution time is comparatively faster.
- No intermediate object code is generated by the Interpreter, hence are memory efficient. Compiler generates intermediate object code which further requires linking, hence requires more memory.
- Interpreter continues translating the program until the first error is met, in which case it stops. Hence debugging is easy. Compiler generates the error message only after scanning the whole program. Hence debugging is comparatively hard.
- Programming language like Python, Ruby use interpreters. Programming language like C, C++ use compilers.
-
1 Answer(s)