Science Fair Projects Ideas - Just-in-time compilation

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Just-in-time compilation

(Redirected from Just-in-time compiler)
See also Just in time for the business technique

In computing, just-in-time compilation (JIT), also known as dynamic translation, is a technique for improving the performance of interpreted programs, by allowing for parts of a program to be partially compiled. This represents a kind of hybrid approach between compiled and interpreted languages.

In the past, some interpreters use an intermediate code, such as p-code or bytecode, where the source code is compiled half-way before run time, and later, at run time, it is interpreted from there. Such systems have been in use for many years, but generally the performance has not been enough to make it a serious competitor. In recent years the increased performance of computers has become such that such approaches like this now seem practical.

The basic idea behind a JIT is that the bytecode is smaller and easier to compile than the original source code, so that the time spent compiling it the "rest of the way" on any particular platform is quite small. In theory this means that the JIT system has the best of both worlds, it can run just as fast as other compiled code, yet the compiler for any particular platform is easier to write because the main bytecode compiler has already done most of the work.

Typical compilers examine the source code for a program and produce a machine-readable executable program. This style of compiler is widely used due to its performance advantages, but is limited in that the executable can only be run on the single platform it was compiled for. Although in theory a different compiler on another platform could be used on the same source code, in practice this is sometimes difficult or expensive to achieve due to differences in languages, compilers, or platforms. Thus a significant number of programs are limited to a single system.

The other approach, is for using an interpreter, which examines the source code on whatever platform it finds itself on. As long as an interpreter exists for a platform, the higher-level interpreted program will be able to run on it. On the downside, interpreters tend to be quite slow. While this is often acceptable for scripting languages, it is not for general purpose programming languages.

History

Dynamic translation was pioneered by the commercial Smalltalk implementation currently known as VisualWorks, in the early 1980s. Currently it is also used by most implementations of the Java virtual machine.

Sun's HotSpot Java virtual machine contains an example of a successful JIT implementation. In fact, it uses two: a "client" compiler which emphasizes fast compilation speed for applications that will be short-lived, and a "server" compiler which emphasizes highly optimized code for applications that will be long-lived. Users can choose which dynamic compiler is used depending upon the characteristics of their application.

Microsoft selected a JIT-based system for their .NET environment, and the Crusoe processor uses similar techniques in hardware. Parrot virtual machine also used JIT. Psyco is a JIT compiler for Python.

Related topics

References

03-10-2013 05:06:04
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice