You are here:

C/interpreters and compilers

Advertisement


Question
hello sir,
my doubt is
why does a compiled version executes faster than a interpreted version of c

Answer
Dear Mr Hope !

I wish to make few points clear between a compiler and an interpreter

A compiler takes lot of time to compile the entire program , during compilation if your program is in need of any library reference all the code related to the function call will be linked with the object module and finally delivers an executable file which in turn subject to execution since all the necessary actions were carried out during the compilation process , execution will take a free fly

On the other hand an interpreted program won't care about any future burden in linking the program it just start its execution if a function call encounters then the program execution will be suspended temporarily and begin linking the code associated with the function call and then it will resume execution , where it stopped already , and thats why  "a compiled version executes faster than a interpreted version of c"

Thanks and Regards!
Prince M. Premnath

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Prince M. Premnath

Expertise


I'm sure that I can solve any doubts in Turbo C ,Graphics Programing ,Mouse, Hardware Programming ,File System ,Interrupts, BIOS handling , TSR Programming , General Concepts in C Language, handling inline Assembly statements

Experience

Research over 6+ Years

Organizations
CG-VAK Softwares and Exports Limited

Education/Credentials
Masters in Computer Applications

©2012 About.com, a part of The New York Times Company. All rights reserved.