A method and apparatus for accelerating program execution in
platform-independent systems by eliminating repeated hot spot recognition
in virtual machines. Optimization information for programs operable on a
target device is stored. It is determined whether stored optimization
information exists for a current program available on the target device,
and if so, the optimization information associated with the current
program is retrieved. The retrieved optimization information is used to
identify program code segments earlier identified for optimization
processing. Portions of the current program not identified for
optimization processing are interpreted via an interpreter, and at
substantially the same time, the program code segments identified for
optimization processing to native code of the target device are compiled.
Using the stored optimization information eliminates the need to analyze
the program for program hot spots each time the program is loaded.