Compilers
- Besides the application software and the system software, there is a third kind of software called the compiler software.
- A compiler is a system program that translates source code (user-written program) into object code (binary form).
- The whole source code file is compiled in one go and a complete.
- This means that the program can only be executed once the translation is complete.
- It is 5-25 times faster than an interpreter.
- Ex- C & C++ are most popular compiled language.
Interpreter
Translate the high-level language and execute the instruction before passing on to the next instruction.
- An Interpreter is a contrast to a compiler, analyzes & executes the source code line- by – line without looking at the entire program.
- First, it translates & executes the first line then it moves to the next line of the source code & repeats the process.
- It is a slow process.
- It is used in the FORTRAN program.
- Ex- JavaScript & VBScript are interpreted language.
| INTERPRETER | COMPILER |
| It translates the program line by line, | It assembles the whole program. |
| The debugging process is easy. | The debugging process is complex as it generates errors only at the end of the compilation. |
| The object code of the statement produced by the interpreter is not saved. | The object code produced by the compiler is permanently saved for future reference. |
| It is a smaller program compared to a compiler. Thus, it occupies lesser memory space and has a lower execution time. | It is a complicated process compared to an interpreter. Thus, it has a higher execution time and occupies larger memory space. |
| It is a slow process. | It is 5-25 times faster than an interpreter. |
| It is used in the FORTRAN program. | It is used in C language program. |