Compiler vs Interpreter
Compiler and Interpreter are two different ways to execute a program written in a programming or scripting language.
A compiler takes entire program and converts it into object code which is typically stored in a file. The object code is also refereed as binary code and can be directly executed by the machine after linking. Examples of compiled programming languages are C and C++.
An Interpreter directly executes instructions written in a programming or scripting language without previously converting them to an object code or machine code. Examples of interpreted languages are Perl, Python and Matlab.
Following are some interesting facts about interpreters and compilers.
1) Both compilers and interpreters covert source code (text files) into tokens, both may generate a parse tree, and both may generate immediate instructions. The basic difference is that a compiler system, including a (built in or separate) linker, generates a stand alone machine code program, while an interpreter system instead performs the actions described by the high level program.
2) Once a program is compiled, its source code is not useful for running the code. For interpreted programs, the source code is needed to run the program every time.
3) In general, interpreted programs run slower than the compiled programs.
4) Java programs are first compiled to an intermediate form, then interpreted by the interpreter.
References:
http://en.wikipedia.org/wiki/Interpreter_%28computing%29
http://en.wikipedia.org/wiki/Compiler
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Recommended Posts:
- Language Processors: Assembler, Compiler and Interpreter
- Maximum number of line intersections formed through intersection of N planes
- Find the character made by adding all the characters of the given string
- Generate an array having Bitwise AND of the previous and the next element
- Find the first N integers such that the sum of their digits is equal to 10
- Find the remainder when First digit of a number is divided by its Last digit
- Find the remaining balance after the transaction
- Count the number of occurrences of a particular digit in a number
- Program to find the Nth Prime Number
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Check whether Quadrilateral is valid or not if angles are given
- AMCAT Mock Paper | Verbal Aptitude 2
- AMCAT Mock Paper | Quantitative Aptitude 5
- AMCAT Mock Paper | Verbal Aptitude 1



