An interpreter translates and executes code line-by-line, making debugging easy but slowing overall execution, while a compiler scans and translates the entire program at once into machine code, speeding up execution but making debugging harder since errors aren't found until scanning is complete. Compilers also generate intermediate object code requiring more memory than interpreters.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
26 views
Interpreter
An interpreter translates and executes code line-by-line, making debugging easy but slowing overall execution, while a compiler scans and translates the entire program at once into machine code, speeding up execution but making debugging harder since errors aren't found until scanning is complete. Compilers also generate intermediate object code requiring more memory than interpreters.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Interpreter Compiler
Scans the entire program and
Translates program one statement at translates it as a whole into machine a time. code.
It takes large amount of time to
It takes less amount of time to analyze the source code but the analyze the source code but the overall execution time is overall execution time is slower. comparatively faster.
No intermediate object code is Generates intermediate object code
generated, hence are memory which further requires linking, hence efficient. requires more memory.
Continues translating the program It generates the error message only
until the first error is met, in which after scanning the whole program. case it stops. Hence debugging is Hence debugging is comparatively easy. hard.
Programming language like C, C++
Programming language like Python, Ruby use interpreters. use compilers. The difference between an interpreter and a compiler is given below: