Content deleted Content added
Cypherquest (talk | contribs) →Comparison of virtual machines: added link to BEAM (Erlang virtual machine) |
|||
Line 161:
''[[Just-in-time compilation]]'' (JIT), refers to a method of compiling to native instructions at the latest possible time, usually immediately before or during the running of the program. The challenge of JIT is more one of implementation than of virtual machine design, however, modern designs have begun to make considerations to help efficiency. The simplest JIT methods simply compile to a code fragment similar to an offline compiler. However, more complex methods are often employed, which specialize compiled code fragments to parameters known only at runtime (see [[Adaptive optimization]]).
''[[Ahead-of-time compilation]]'' (AOT) refers to the more classic method of using
''[[Shared library|Shared libraries]]'' are a facility to reuse segments of native code across multiple running programs. In modern operating systems, this generally means using [[virtual memory]] to share the memory pages containing a shared library across different processes which are protected from each other via [[memory protection]]. It is interesting that aggressive JIT methods such as adaptive optimization often produce code fragments unsuitable for sharing across processes or successive runs of the program, requiring a tradeoff be made between the efficiencies of precompiled and shared code and the advantages of adaptively specialized code. For example, several design provisions of CIL are present to allow for efficient shared libraries, possibly at the cost of more specialized JIT code. The JVM implementation on [[OS X]] uses a Java Shared Archive<ref>[https://developer.apple.com/mac/library/documentation/Java/Conceptual/Java14Development/00-Intro/JavaDevelopment.html Apple docs on OS X use of Java Shared Archive]</ref> to provide some of the benefits of shared libraries.
|