Experiments in Program Compilation by Interpreter Specialization
Résumé
Interpretation and run-time compilation techniques are becoming increasingly important due to the need to support heterogeneous architectures, evolving programming languages, and dynamically downloaded code. Although interpreters are easy to write and maintain, they are inefficient. On the other hand, run-time compilation provides efficient execution, but is costly to implement. One way to get the best of both approaches is to apply program specialization to an interpreter in order to generate an efficient implementation automatical- ly. Recent advances in program specialization technology have resulted in important improvements in the performance of specialized interpreters. This paper presents and assesses experimental results for the application of program specialization to both bytecode and structured-language interpreter- s. The results show that for general-purpose bytecode, program specialization can yield speedups of up to a factor of four, while specializing certain structured-language interpreters can yield performance equivalent to code compiled by a general-purpose compiler.