Compiler Vs Interpreter

Let’s see the main differences between Compiler Vs Interpreter. Both compiler and interpreter act differently in many aspects.

Compiler Vs Interpreter

Compiler Vs Interpreter

COMPILER:

  1. Compiler takes an entire program as input. It works on the complete program at once
  2. It generates Intermediate Object code (machine code)
  3. It executes Conditional control statements faster than Interpreter
  4. More memory required (since Object Code is generated)
  5. Compiled program doesn’t need to be compiled every time
  6. Errors are displayed after entire program is checked
  7. Programming languages that use compilers are C, C++

INTERPRETER:

  1. Interpreter takes a single statement at a time as input. It works line by line
  2. It doesn’t generate Intermediate code (machine code)
  3. It executes Conditional control statements much slower than Compiler
  4. Memory requirement is less. It doesn’t generate intermediate Object Code
  5. Every time higher level program is converted into lower level program
  6. Errors are displayed for every instruction interpreted (if any)
  7. Programming languages that use interpreter are Visual Basic Script, Ruby, Perl

 

COMPILERINTERPRETER
Compiler takes an entire program as input. It works on the complete program at onceInterpreter takes a single statement at a time as input. It works line by line
It generates Intermediate Object code (machine code)It doesn’t generate Intermediate code (machine code)
It executes Conditional control statements faster than InterpreterIt executes Conditional control statements much slower than Compiler
More memory required (since Object Code is generated)Memory requirement is less. It doesn't generate intermediate Object Code
Compiled program doesn't need to be compiled every timeEvery time higher level program is converted into lower level program
Errors are displayed after entire program is checkedErrors are displayed for every instruction interpreted (if any)
Programming languages that use compilers are C, C++Programming languages that use interpreter are Visual Basic Script, Ruby, Perl

Sharing is caring.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar

Leave a Comment

API Testing eBook

DOWNLOAD FOR FREE