Site icon i2tutorials

Compiler Design-Compiler vs Interpreter

Compiler vs Interpreter

 

Compiler

Interpreter

  • A compiler is a machine that takes the high-level language as the input and gives an assembly level language as the output.
  • An interpreter is an application that converts the programming language into comprehensible language.
  • The entire program is compiled at once.
  • One statement is compiled at a time.
  • It scans the entire code once and gives all the errors at once in the end.
  • Since each line is compiled at once, it gives errors line by line.
  • Execution time is less.
  • Execution time is more.
  • It converts source code into object code
  • Does not convert source code into object code.
  • Does not require source code for further execution
  • Requires source code for further execution.
  • It requires memory, since object code is generated which requires further linking.
  • It is memory efficient, since no object code is generated
  • Eg: C, C++, etc
  • Python, Ruby, MATLAB, etc

 

Reference Link

Compiler vs Interpreter

Exit mobile version