answersLogoWhite

0

Compilers translate the entire source code into machine code. Each translation unit (source file) is independently converted into an object file. Once all translation units have been compiled, the object files are linked together to produce an executable file. The executable file does not require any further translation and can be executed independently of the compiler. The executable is non-portable, but will execute as fast as the architecture will allow. In order to port the program to other architectures, the source code must be recompiled from scratch by a compiler intended specifically for those machines.

Interpreters translate one statement at a time and immediately execute them before moving onto the next statement. No independent executable is produced by an interpreter; the source code must be re-interpreted every time it is run. Thus the code is dependant upon the interpreter but is not machine-specific. While interpreted languages are more portable than compiled languages, execution is greatly impaired by the need to interpret the code every time it is run.

Some languages are both compiled and interpreted. Rather than producing a machine code executable, the compiler produces an intermediate byte code which can then be interpreted. Java is a typical example. The Java source code is compiled against the Java Virtual Machine (JVM) to produce portable Java byte code that can then be interpreted by any JVM implementation. Although execution is still much slower than that of machine code, the byte code is much more compact than the original source code and gives greater opportunities for optimisations that would not be possible with more traditional interpretation.

Because interpreted languages are dependant upon an interpreter, they are only suitable for writing applications software. This includes Java. Compiled languages are much less restricted. C++, for instance, can be used to write general purpose programs, including operating system kernels, device drivers, subsystems programming as well as applications software.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What is the difference between a translator and an interpreter?

A translator is written translation. And an interpreter is an oral translation.


What is the difference between computer interpreter assembler?

wee2


What is the difference between compilers and interpreters in c plus plus in tabular form?

C-compiler translates the C-source into Assembly or machine code. On the other hand, C-interpreter -- well, there is no such thing as C-interpreter.


State two differences between a compiler and an interpreter?

# An interpreter translates from source code to machine code on-the-fly; a compiler does it all before the program is executed. # Compilers can spend a lot of time on analysis and optimization, allowing for (generally) better performance of code.


What is the difference between interpreter and parser and compiler?

in my personal point of view i would say a parser is more like "one-directional" "automatic" vs. an interpreter, the interpreter has more "intelligence"


What is compilers and interpreters the purpose?

compiler and interpreter used to convert high level language to machine level language .....compiler does dis job in atonce while interpreter does in step by step


What is the difference between pure and impure interpreter?

fftaysuihi7y78yndh


You want to become a Russian - English translator where can you get an information?

To find answers to the following questions, visit http://www.soniamelnikova.com: What is a certified translator or interpreter? What is certified translation? What is the difference between translation and interpreting? What is a court interpreter? What is the difference between a registered and a certified court interpreter? Is special training recommended to become a court interpreter? What is ATA Certification? Also, visit: www.lingotip.com www.proz.com www.atanet.org


What is the difference between debugger and interpreter?

the answer is that no body knows what it is including me so crack it man.:P


What is the difference between a strict interpreter and a loose interpreter?

A strict interpreter must change every word from the speakers language to the listeners language. A loose interpreter has more liberty to relay the message in the most efficient way without concern of every word.


What is a hybrid compiler?

Hybrid compiler is a compiler which translates a human readable source code to an intermediate byte code for later interpretation. So these languages do have both features of a compiler and an interpreter. These types of compilers are commonly known as Just In-time Compilers (JIT). Java is one good example for these types of compilers.


What is interpration?

What is the main difference between compilation and interpretation? Give an example of languages of compilation and interpretation respectively.