Difference Between Compiler And Interpreter

  1. Difference Between Compiler And Interpreter In Table

INTERPRETER: Interpreter takes a single statement at a time as input. Memory requirement is less. Compiler takes an entire program as input. It works on the complete program at once Interpreter takes a single statement at a time as input. More memory required (since Object Code is generated) Memory requirement is less. A compiler produces an object code before creating an executable file for the same. The compiled program is directly executed using the object code. On the other hand, an interpreter executes the source code by reading one line at a time.

Compiler Vs Interpreter COMPILER:. Compiler takes an entire program as input. It works on the complete program at once. It generates Intermediate Object code (machine code).

It executes Conditional control statements faster than Interpreter. More memory required (since Object Code is generated).

Similarities between compiler and interpreter

Compiled program doesn’t need to be compiled every time. Errors are displayed after entire program is checked. Programming languages that use compilers are C, CINTERPRETER:.

Interpreter takes a single statement at a time as input. It works line by line. It doesn’t generate Intermediate code (machine code). It executes Conditional control statements much slower than Compiler.

Memory requirement is less. It doesn’t generate intermediate Object Code. Every time higher level program is converted into lower level program. Errors are displayed for every instruction interpreted (if any). Programming languages that use interpreter are, Ruby, PerlCOMPILERINTERPRETERCompiler 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 lineIt 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 CompilerMore memory required (since Object Code is generated)Memory requirement is less.

Difference Between Compiler And Interpreter In Table

It doesn't generate intermediate Object CodeCompiled program doesn't need to be compiled every timeEvery time higher level program is converted into lower level programErrors are displayed after entire program is checkedErrors are displayed for every instruction interpreted (if any)Programming languages that use compilers are C, CProgramming languages that use interpreter are Visual Basic Script, Ruby, Perl.

Posted on