Hello Friends!
I want to know the difference between the Compiler & Interpreter!
Regards,
Hello Friends!
I want to know the difference between the Compiler & Interpreter!
Regards,
A compiler, in general, reads higher level language computer code and converts it to either p-code or native machine code. An interpreter runs directly from p-code or an interpreted code such as Basic or Lisp. Typically, compled code runs much faster, is more compact and has already found all of the syntax errors and many of the illegal reference errors. Interpreted code only finds such errors after the application attempts to interpret the affected code. Interpreted code is often good for simple applications that will only be used once or at most a couple times, or maybe even for prototyping. Compiled code is better for serious applications.
The differences between Compiler and Interpreter are:
Compiler
1 : one that compiles
2 : a computer program that translates an entire set of instructions written in a higher-level symbolic language (as C) into machine language before the instructions can be executed
spends a lot of time analyzing and processing the program
the resulting executable is some form of machine- specific binary code
the computer hardware interprets (executes) the resulting code
program execution is fast
Interpreter
1: one that interprets: as a: one who translates orally for parties conversing in different languages b: one who explains or expounds
2 a: a machine that prints on punch cards the symbols recorded in them by perforations b: a computer program that executes each of a set of high-level instructions before going to the next instruction
relatively little time is spent analyzing and processing the program
the resulting code is some sort of intermediate code
the resulting code is interpreted by another program
program execution is relatively slow
They are both similar as they achieve similar purposes, but inherently different as to how they achieve that purpose. Compiled code takes programs (source) written in some kind of programming language, and then ultimately translates it into object code or machine language. Compiled code does the work much more efficiently, because it produces a complete machine language program, which can then be executed. The interpreter translates instructions one at a time, and then executes those instructions immediately. The compiler is itself a computer program written usually in some implementation language.
Please visit this page for more detailed comparison between Compiler VS Interpreter!
Hope this helps!
Bookmarks