Serial No. | Compiler | Interpreter |
1. | A compiler is a program that converts the entire high-level language into machine language. | An interpreter is a program that converts high-level language line by line into machine language.
|
2. | In the case of large files, the compiler takes time to analyze the entire source code.
| In the case of large files, the interpreter takes less time to analyze the source code.
|
3. | The compiler is fast as compared to the interpreter.
| The interpreter is slow as compared to the compiler.
|
4. | The compiler generates the error message after scanning the whole program, so debugging (It is the process of finding and resolving bugs) is comparatively hard as the error can be present anywhere in the program.
| Its Debugging is easy as it translates the program line by line, so the error can be checked earlier. |
5. | The compiler requires a lot of memory for generating object codes. | It requires less memory than a compiler. |
6. | Examples - C, C++, Java | Example - Python, Perl, JavaScript, Ruby |
0 Comments