Analyzing the performance of code-copying virtual machines

抄録

<jats:p> Many popular programming languages use interpreter-based execution for portability, supporting dynamic or reflective properties, and ease of implementation. <jats:italic>Code-copying</jats:italic> is an optimization technique for interpreters that reduces the performance gap between interpretation and <jats:italic>JIT</jats:italic> compilation, offering significant speedups over direct-threading interpretation. Due to varying language features and virtual machine design, however, not all languages benefit from codecopying to the same extent. We consider here properties of interpreted languages, and in particular bytecode and virtual machine construction that enhance or reduce the impact of code-copying. We implemented code-copying and compared performance with the original direct-threading virtual machines for three languages, Java (SableVM), OCaml, and Ruby (Yarv), examining performance on three different architectures, ia32 (Pentium 4), x86_64 (AMD64) and PowerPC (G5). Best speedups are achieved on ia32 by OCaml (maximum 4.88 times, 2.81 times on average), where a small and simple bytecode design facilitates improvements to branch prediction brought by code-copying. Yarv only slightly improves over direct-threading; large working sizes of bytecodes, and a relatively small fraction of time spent in the actual interpreter loop both limit the application of codecopying and its overall net effect. We are able to show that simple ahead of time analysis of VM and execution properties can help determine the suitability of code-copying for a particular VM before an implementation of code-copying is even attempted. </jats:p>

収録刊行物

  • ACM SIGPLAN Notices

    ACM SIGPLAN Notices 43 (10), 403-422, 2008-10-19

    Association for Computing Machinery (ACM)

被引用文献 (1)*注記

もっと見る

詳細情報 詳細情報について

問題の指摘

ページトップへ