Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Discussion:- Compiler Vs Interpreter

View previous topic View next topic Go down

Discussion:- Compiler Vs Interpreter

Post  Nishchal on Tue Jun 08, 2010 11:32 am

As you guys know we have two way to change source code to machine code . Through Compiler and Through Interpreter. But What is Best and in what situation one outperforms other.
avatar
Nishchal
The Last Don

Posts : 55
Join date : 2010-05-22
Age : 32

View user profile http://gpdckullubca.forum-motion.com

Back to top Go down

Re: Discussion:- Compiler Vs Interpreter

Post  vijay thakur on Tue Jun 08, 2010 2:11 pm

Both interprter and compiler are translator,bt they should be used as the situtation occures....


As we know that compiler is a translator that convert source code into machine code..therfore compiler is used in situtation where we want to compile all the program at a time .it compile all the program at once and then flag error if any..it also produce the number line where error is encounterd.so to save time, compiler should be used.to compile line by line in tc press shift+f7 key.

nw come to interpreter,interpreter is translator that translate source code line by line.so it is time consuming.interpter should be used in situation where it became diffcult to debug source program by compiler
avatar
vijay thakur
Starters

Posts : 25
Join date : 2010-05-23
Age : 25
Location : kullu

View user profile

Back to top Go down

o yeah !!

Post  mahant saab !! on Tue Jun 08, 2010 11:53 pm

सत्य वचन भाईसाहब !! afro
avatar
mahant saab !!
Starters

Posts : 5
Join date : 2010-06-05
Age : 70
Location : kullu

View user profile

Back to top Go down

Re: Discussion:- Compiler Vs Interpreter

Post  Nishchal on Wed Jun 09, 2010 7:10 pm

vijay thakur wrote:Both interprter and compiler are translator,bt they should be used as the situtation occures....


As we know that compiler is a translator that convert source code into machine code..therfore compiler is used in situtation where we want to compile all the program at a time .it compile all the program at once and then flag error if any..it also produce the number line where error is encounterd.so to save time, compiler should be used.to compile line by line in tc press shift+f7 key.

nw come to interpreter,interpreter is translator that translate source code line by line.so it is time consuming.interpter should be used in situation where it became difficult to debug source program by compiler

actually the interpreter and compiler can do the same job . If compiler cant compile the code then interpreter wont interpret it as well.

Here is some points that can destinguish both things:-
1. Compiler need all the source code , but that doesnt mean interpreter doesnt. Interpreter also neds the full source code.
2. When Using Compiler the source Code is Converted into Machine code. But interpreter will generate the code while its interpreting the source code. so essentially there is the main difference between comipler's code and interpreter's code. While compiler's generated code is actaully machine code , interpreter works directly on the source code.
3.this brings us to the conclusion that once compiled it is very hard to change the machine code generated by compiler, on the other hand interpreter works directly on the source code which can be modified directly (i.e more easily)

4. as far as performence is concerned , Compiler code will run fast as its in machine code already. While there is a overhead associated with interpreting the code on runtime and converting it to machine code and then running it.

5. Most of the advance engine use both compiler and interpreter for better flexibility. Core part is comipled while scripting part is often interpreted.
avatar
Nishchal
The Last Don

Posts : 55
Join date : 2010-05-22
Age : 32

View user profile http://gpdckullubca.forum-motion.com

Back to top Go down

Re: Discussion:- Compiler Vs Interpreter

Post  vijay thakur on Wed Jun 09, 2010 8:15 pm

thanks sir.......................... Arrow
avatar
vijay thakur
Starters

Posts : 25
Join date : 2010-05-23
Age : 25
Location : kullu

View user profile

Back to top Go down

Re: Discussion:- Compiler Vs Interpreter

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum