Object-code virtualization, commonly used to achieve software portability, relies on a virtual execution environment, typically
comprising an interpreter used for initial execution of methods, and a JIT for native code generation. The availability of
multiple processors on current architectures makes it attractive to perform dynamic compilation in parallel with application
execution. The major issue is to decide at runtime which methods to compile ahead of execution, and how much time to invest
in their optimization. This research introduces an abstract model, termed Dynamic Look Ahead (DLA) compilation, which represents
the available information on method calls and computational weight as a weighted graph. The graph dynamically evolves as computation
proceeds. The model is then instantiated by specifying criteria for adaptively choosing the method compilation order. The
DLA approach has been applied within our dynamic compiler for .NET. Experimental results are reported and analyzed, for both
synthetic programs and benchmarks. The main finding is that a careful choice of method-selection criteria, based on light-weight
program analysis and execution tracing, is essential to mask compilation times and to achieve higher overall performances.
On multi-processors, the DLA approach is expected to challenge the traditional virtualization environments based on bytecode
interpretation and JITing, thus bridging the gap between ahead-of-time and just-in-time translation.
This work is supported in part by the European Commission under Framework Programme 7, OpenMedia Platform project.