Differentiate between Compiler and Interpreter.

S.no.CompilerInterpreter
1A compiler translates the complete source program in a single run.An interpreter translates the source program line by line.
2It consumes less time.It consumes more time than the compiler.
3It is faster.It is slower.
4It is more efficient.It is less efficient.
5It is not flexible.It is flexible.
6Compilers are larger in size.Interpreters are often smaller than compilers.
7The error localization is difficult.The error localization is easier than the compiler.
8CPU utilization is more.CPU utilization is less as compared to compilers.
10Both syntactic and semantic errors can be checked at the same time.Only syntactic errors can be checked at a time.
11A presence of an error may cause the whole program to be reorganized.A presence of an error causes only a part of the program to be reorganized.
12A compiler does not provide an improved debugging environment.An interpreter provides an improved debugging environment.
13The compiler is used by languages such as C. C++ etc.An Interpreter is used by languages such as Java.

What is Compiler & interpreter

Leave a Reply