A virtual machine is an abstract computational environment that allows platform-independent compilation of software applications. Software may be compiled and optimized to produce bytecodes for execution in the abstract computational environment. The virtual machine, often implemented as a software application, executes the compiled bytecodes to provide an interface between the abstract computational environment and a computer system. Instead of requiring recompilation for each supported platform, the bytecodes may be executed on any platform that implements the virtual machine.
By inserting a layer of abstraction, a virtual machine architecture increases software portability without overly impairing execution efficiency. In its simplest form, a virtual machine can be implemented by creating a software emulation of the abstract computational environment. Each supported platform provides a virtual machine that implements the abstract computational environment. Because the bytecodes are compiled, they may be executed on each supported platform without further compilation or processing other than that required by the virtual machine in emulating the abstract computational environment.
Several companies have developed virtual machine environments to provide multi-platform support in a Web services architecture, such as SUN MICROSYSTEMS' JAVA Virtual Machine (JVM) of MICROSOFT's Common Language Runtime (CLR). MICROSOFT's .Net Web services architecture uses the MICROSOFT CLR virtual machine to support a wide variety of programming languages. Software written in any supported programming language may be compiled for execution on the abstract computation environment implemented by the CLR virtual machine. As the use of virtual machines increases, it becomes more important to increase their performance.