INTRODUCTION TO COMPILER DESIGN
COMPILATION PROCESS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Interpreter
|
|
Compiler
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -Ans: If the process is considered, the Interpreter is faster than the compiler. However, once a program is compiled, Runtime or execution is faster for a compiled program over-interpreted ones.
Detailed explanation-2: -A compiled program is faster to run than an interpreted program, but it takes more time to compile and run a program than to just interpret it. A compiler indeed produces faster programs. It happens fundamentally because it must analyze each statement just once, while an interpreter must analyze it each time.
Detailed explanation-3: -If any error is spotted, it stops working and hence debugging becomes easy. A compiler generates the error message only after it scans the complete program and hence debugging is relatively harder while working with a compiler. Interpreters are used by programming languages like Ruby and Python for example.