Question:
compilation vs interpretation in p/g language?
ani
2008-10-09 02:09:28 UTC
WHICH IS FASTER------
COMPILATION or INTERPRETATION
AND WHY????????
Four answers:
Bro
2008-10-09 02:24:47 UTC
Depends on what you're doing... but...



Interpreted languages tend to be faster to develop programs in, but the code itself doesn't run as quickly as compiled code, because you are invoking a "translator" (the interpreter) every time you run your program to convert your human-readable code into machine-readable code.



Compiled languages tend to require more time for developing programs, but once they're compiled, they tend to run faster than a similar program being run through an interpreter. The code is already "translated" through the compilation process, and doesn't need to be translated to machine language every time you run it.



But as computers get faster and faster, the difference in execution speeds between interpreted and compiled code becomes less and less noticeable.
Lakshmi Kanth
2008-10-09 23:34:44 UTC
In the early days of computing, language design was heavily influenced by the decision to use compilation or interpretation as a mode of execution. For example, some compiled languages require that programs must explicitly state the data-type of a variable at the time it is declared or first used while some interpreted languages take advantage of the dynamic aspects of interpretation to make such declarations unnecessary. For example, Smalltalk—which was designed to be interpreted at run-time—allows generic Objects to dynamically interact with each other.



Initially, interpreted languages were compiled line-by-line; that is, each line was compiled as it was about to be executed, and if a loop or subroutine caused certain lines to be executed multiple times, they would be recompiled every time. This has become much less common. Most so-called interpreted languages use an intermediate representation, which combines both compilation and interpretation. In this case, a compiler may output some form of bytecode or threaded code, which is then executed by a bytecode interpreter. Examples include Python, and Java



Interpreted languages still give programs certain extra flexibility over compiled languages. Features that are easier to implement in interpreters than in compilers include (but are not limited to):





For faster development of applications, programmers choose Interpredted languages (RAD - Rapid Application development)

It is easy to use and develop applications, flexible and provides many features like



platform independence (Java's byte code, for example)

dynamic typing

ease of debugging (It is easier to get source code information in interpreted languages)

small program size (Since interpreted languages have flexibility to choose instruction code)

object polymorphism

dynamic scoping





Interpreted Languages:

ASP Web page scripting language

BASIC

COBOL





A compiled language is a programming language whose implementations are typically compilers (translators which generate machine code from source code), and not interpreters (step-by-step executors of source code, where no translation takes place).



A program translated by a compiler tends to be much faster than an interpreter executing the same program: even a 10:1 ratio is not uncommon. The mixed solution's efficiency is typically somewhere in between. The downsides of the "compiler" solution are the inherent complexity of a good implementation, and longer edit-run cycles.



A pure compiler implementation is the typical solution for low-level languages, because it comes out as more "natural", and because of efficiency concerns; however with some effort it is always possible to write compilers even for traditionally interpreted languages





Some languages that are commonly considered to be compiled:



C, C++

Delphi

Pascal
Dr LOL
2008-10-09 02:48:00 UTC
> But as computers get faster and faster, the difference in execution speeds between interpreted and compiled code becomes less and less noticeable.



Er... no. The difference stays the same, or marginally decreases. But faster computers will NOT make compiling slower and interpreting faster (or vice-versa). That's stupid.
?
2016-10-06 05:31:31 UTC
astounding Tracklist: (Pen On Paper Vol.a million) a million. [40’s and Hip-Hop] Shadez of Brooklyn – substitute 2. [It Takes A us of a] Mic Geronimo – ****’s actual 3. [NoOffense.NaSty] All city – in basic terms stay 4. [The Co_oL] unwell Biskits – Hypnotic advantages 5. [Marcus] Jedi ideas tricks – Get This Low 6. [**** B] Meccalicious – desire the international Don’t provide up 7. [Dave] Souls Of Mischief feet Del Tha Funkee Homosapien – ’ninety 4 by making use of satellite tv for pc 8. [cheesy] Divine ordinary – You Don’t be responsive to The a million/2 Of This 9. [Rhyme Sayer] sq. One – study 10. [LuxDelux] Adagio! – Listening exhilaration 11. [nonetheless Fly Up] Saafir – gentle Sleeper 12. [Richie] D&D Allstars – a million, 2 bypass It 13. [Cameron the Pharoh] next financial disaster – Props Don’t Pay The hire 14. [S. Perrota] Sharpshooters – study 15. [Annyrutts] Juggaknots – difficulty guy sixteen. [Matt C] Bas Blasta feet JuJu, Lord Finesse, fat Joe & Godfather Don – The Rhythm (i will receive it now) carry out the Vol.2


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...