摘要 |
<p>Methods and apparatus for efficiently implementing a virtual machine are disclosed. According to one aspect of the present invention, a method for increasing the performance of a virtual machine includes obtaining a program instruction to be executed by the virtual machine, determining when the program instruction is a branch instruction, and determining when a basic block is present in a code cache if the program instruction is a branch instruction. The basic block includes code, and the code cache is associated with the virtual machine. Finally, the method includes executing the code included in the basic block when if the basic block is present. In one embodiment, the program instruction is a bytecode and the code cache is a native code cache.</p> |