February 8, 2013 by Ozgur Ozden
Before we go into details and making comparisons, it is a good idea to remember basic key points about Interpreted code and compiled code.
Interpreted code: is a code without compilation. Interpreter runs the program step-by step so it is a slow process compare to compiling. Interpreted languages are executed every time the program is run and this increases the cost of running the program.
Few advantages that are common in interpreted languages are,
- Independent of Platforms
- Active typing
- Easy to debug and learn
- Program size is small
Disadvantages of interpreting,
- Slow in execution
- Late binding
- Loosely coupled
- Variant Types
Compiled Code: is a kind of computer program, compiler, that changes source code to another language, machine specific language. Main reason for compiling a program is to have an executable (exe) file. Most of the time compiler translates source code from high level programing to low level programing.
During the transferring process compiler performs the following steps:
1- Lexical Analysis: In this step source code is divided into small pieces called tokens and then passes these tokens to parser.
2- Parsing: is a process of defining the tokens from grammatical point of view.
3- Code Generation: Which is the process of generating machine readable instructions.
Both languages have strong and weak points. Interpreted languages are usually prefered if we have a time restrictions on the project development or ease of future developments. But whenever we use interpreted languages we are trading speed with high running costs.
1- Wikipedia.com, 2006, Interpreted Language. [Online] http://en.wikipedia.org/wiki/Interpreted_language Accessed [January 15, 2013]
2- Brookshear, J.G. (2011) Computer Science An Overview. 11th ed. New York: Addison-Wesley.
3-. Compiled versus interpreted languages [Online] http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zappldev/zappldev_85.htm Accessed [January 15, 2013]