Compiler vs. Interperter
Compiler vs. Interperter
Interpreter
Compiler
• The compiler can catch only syntax errors and some semantic errors.
• Compilation can take more time in the case of bulky code.
What is an Interpreter?
The compiler can see code upfront which helps in running the The Interpreter works by line working of Code, that’s why
code faster because of performing Optimization. Optimization is a little slower compared to Compilers.
It does not require source code for later execution. It requires source code for later execution.
Execution of the program takes place only after the whole Execution of the program happens after every line is checked or
program is compiled. evaluated.
Compilers more often take a large amount of time for analyzing In comparison, Interpreters take less time for analyzing the source
the source code. code.
CPU utilization is more in the case of a Compiler. CPU utilization is less in the case of a Interpreter.
The use of Compilers mostly happens in Production The use of Interpreters is mostly in Programming and Development
Environment. Environments.
Object code is permanently saved for future use. No object code is saved for future use.
C, C++, C#, etc are programming languages that are compiler- Python, Ruby, Perl, SNOBOL, MATLAB, etc are programming
based. languages that are interpreter-based.