Differentiate between Compiler and Interpreter.


COMPILER
INTERPRETER
1.     A compiler translates the entire source program into object program in a single attempt, and then only the object program is executed.
2.     Compiler is faster than interpreter because the execution time is less. A compiler is 5 to 25 times faster than an interpreter.
3.     Compiler is a complex program i.e. it is larger than that of interpreter.
4.     As compared to an interpreter, developing a compiler is difficult task.
5.     Compiler make it little bit difficult and slower to detect and correct the syntax error.
6.     A compiler is a big and complex program therefore it occupies more space in memory.
7.     The compiled program (called object code) is permanently saved in the hard disk for future use. Therefore, the program need not be recompiled for execution next time.
1.     An interpreter translates one statement at a time, executes it and continues for another statement.
2.     Interpreter is slower than compiler because the execution time is more.
3.     Interpreter is less complex program than Compiler. An interpreter is a smaller program as compared to compiler.
4.     As compared to a compiler, developing an interpreter is easier.
5.     Interpreter makes it easier to detect syntax error in a program.
6.     An interpreter is smaller and less complex than compiler.It occupies less memory space.
7.     The interpreter program is temporarily saved, therefore need to reinterpreted next time.

0 comments:

Feel free to contact the admin for any suggestions and help.