Differences and similarities between a compiler and interpreter language processor.
In the world of computer languages, there are different bases in which we can divide the languages. One division can be made on the bases of compiler and interpreter.
Here are the difference and similarities between a compiler and interpreter:
Differences
Compiler
|
Interpreter
|
|
1.
|
Compiler is a language processer which converts high-level language (HLL) to low- level language (LLL) and vise-versa in one go.
|
Interpreter is a language processer which converts high-level language to low-level language and vise-versa line by line.
|
2.
|
It converts the language in one go.
|
It converts the language line by line.
|
3.
|
The execution of code is faster than interpreter.
|
The execution of code is slower than compiler.
|
4.
|
The codes require more memory than interpreter.
|
The codes require less memory than compiler.
|
5.
|
C and C++ can be the examples for it.
|
Python and Ruby can be the examples for it.
|
Similarities
Compiler
|
Interpreter
|
Compiler is a language processer which converts high-level language (HLL) to low- level language (LLL) and vise-versa.
|
Interpreter is a language processer which converts high-level language to low-level language and vise-versa.
|
It converts the language.
|
It converts also the language.
|
It is a high-level language.
|
It is also a high-level language.
|
It can be used to find errors in source program.
|
It can also be used to find errors in source program.
|
Java can be the example for it.
|
Java can be the example for it also as Java is both, a compiler and interpreter.
|