Dynamic compilation

Dynamic compilation

Dynamic compilation is a process used by some programming language implementations to gain performance during program execution. Although the technique originated in the Self programming language,[citation needed] the best-known language that uses this technique is Java. Since the machine code emitted by a dynamic compiler is constructed and optimized at program runtime, the use of dynamic compilation enables optimizations for efficiency not available to compiled programs except through code duplication or metaprogramming.

Runtime environments using dynamic compilation typically have programs run slowly for the first few minutes, and then after that, most of the compilation and recompilation is done and it runs quickly. Due to this initial performance lag, dynamic compilation is undesirable in certain cases. In most implementations of dynamic compilation, some optimizations that could be done at the initial compile time are delayed until further compilation at run-time, causing further unnecessary slowdowns. Just-in-time compilation is a form of dynamic compilation.

A closely related technique is incremental compilation. An incremental compiler is used in POP-2, POP-11, some versions of Lisp, e.g. Maclisp and at least one version of the ML programming language (Poplog ML). This requires the compiler for the programming language to be part of the runtime system. In consequence, source code can be read in at any time, from the terminal, from a file, or possibly from a data-structure constructed by the running program, and translated into a machine code block or function (which may replace a previous function of the same name), which is then immediately available for use by the program. Because of the need for speed of compilation during interactive development and testing, the compiled code is likely not to be as heavily optimised as code produced by a standard 'batch compiler', which reads in source code and produces object files that can subsequently be linked and run. However an incrementally compiled program will typically run much faster than an interpreted version of the same program. Incremental compilation thus provides a mixture of the benefits of interpreted and compiled languages. To aid portability it is generally desirable for the incremental compiler to operate in two stages, namely first compiling to some intermediate platform-independent language, and then compiling from that to machine code for the host machine. In this case porting requires only changing the 'back end' compiler. Unlike dynamic compilation, as defined above, incremental compilation does not involve further optimisations after the program is first run.

See also

External links



Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Dynamic Kernel Module Support — Original author(s) Gary Lerhaupt Developer(s) Dell Initial release 2003 Stable release 2.2.0.2[ …   Wikipedia

  • Dynamic programming language — This article is about a class of programming languages, for the method for reducing the runtime of algorithms, see Dynamic programming. Dynamic programming language is a term used broadly in computer science to describe a class of high level… …   Wikipedia

  • Dynamic-Link Library — Bibliothèque logicielle Pour les articles homonymes, voir Bibliothèque (homonymie) et DLL. En informatique, une bibliothèque ou librairie[1] logicielle (ou encore, bibliothèque de programmes) est un ensemble de fonctions utilitaires, regroupées… …   Wikipédia en Français

  • Dynamic Link Library — Bibliothèque logicielle Pour les articles homonymes, voir Bibliothèque (homonymie) et DLL. En informatique, une bibliothèque ou librairie[1] logicielle (ou encore, bibliothèque de programmes) est un ensemble de fonctions utilitaires, regroupées… …   Wikipédia en Français

  • Dynamic-link library — This article is about the OS/2 and Windows implementation. For dynamic linking of libraries in general, see Dynamic linker. Dynamic link library Filename extension .dll Internet media type application/x msd …   Wikipedia

  • Dynamic recompilation — In computer science, dynamic recompilation (sometimes abbreviated to dynarec or the pseudo acronym DRC) is a feature of some emulators and virtual machines, where the system may recompile some part of a program during execution. By compiling… …   Wikipedia

  • Dynamic Twins — The Dynamic Twins were a Bronx born Christian rap group composed of identical twins Noel and Robbie Arthurton. Contents 1 Origins 2 Recording debut 3 Where They Can Be Seen 4 Discography …   Wikipedia

  • Dynamic Language Runtime — La DLR est une surcouche facilitant l implémentation et l interopérabilité des langages dynamiques. La DLR permet de supporter plusieurs langages. Cette technologie est utilisé par Microsoft pour la plateforme .NET et Sun pour son langage java.… …   Wikipédia en Français

  • dynamic typing — noun A system in which type checking is performed at run time and not at compilation, opposed to static typing …   Wiktionary

  • Just-in-time compilation — In computing, just in time compilation (JIT), also known as dynamic translation, is a method to improve the runtime performance of computer programs. Historically, computer programs had two modes of runtime operation, either interpreted or static …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”