- A compiler first takes in the entire program, checks for errors, compiles it and then executes it. Whereas, an interpreter does this line by line, so it takes one line, checks it for errors and then executes it.
- In compiler, the resulting executable is some form of machine- specific binary code. In an interpreter, the resulting code is some sort of intermediate code.
- As a compiler executes the entire program at a time, it operates fast. Interpreter takes one line at a time and so, its tradeoff is slow.
- A compiler spends a lot of time analyzing and processing the program. An interpreter spends relatively little time is spent analyzing and processing the program.
- Program Execution is faster in compiler than in interpreter.
- Interaction level is high in interpreter than in compiler.
- In a production environment where throughput is more critical, a compiled language is preferred. Any high-level language can either be interpreted or compiled.
- An interpreter lets the programmer know immediately when and where problems exist in the code; compiled programs make the programmer wait until the program is complete.
- Literally, a compiler is a static interpreter. An interpreter is a dynamic compiler.
- Example for compiler: C, C++. Example for interpreter: Perl.
My name is Sai Ravi Kiran Mallampati. In this blog, I am writing blog posts about Ubuntu, UNIX Commands, IDE's, Java, C++ etc.,
Sunday, January 17, 2010
Differences between a compiler and an interpreter
Saturday, December 19, 2009
Difference between "Project" and "Product"
- A Software project is based on single client's request. Product is generic for any relevant client's request.
- Project can give solution for one particular problem existing on particular company. Product is solution for the problem exists in the industry, can be customizable to any company.
Subscribe to:
Posts (Atom)