arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2201.09268cs.PL
收藏

一个解释器和一个引擎的两级即时编译

Two-level Just-in-Time Compilation with One Interpreter and One Engine

Yusuke Izawa, Hidehiko Masuhara, Carl Friedrich Bolz-Tereick

摘要:

运行Java或JavaScript的现代强大虚拟机支持多层JIT编译和优化功能,以实现其高性能。然而,实现和维护多个相互交互的编译器/优化器需要勤奋的VM开发人员。在本文中,我们提出了一种在RPython中实现两级JIT编译的技术,而无需从头开始实现多个解释器或编译器。作为初步实现,我们创建了自适应RPython,它可以执行基于线程代码的基线JIT编译和跟踪JIT编译。我们还用它实现了一个小型的程序设计语言。此外,我们初步评估了该小型语言的性能,我们的基线JIT编译运行速度比仅解释器执行快1.77倍。此外,我们观察到,当我们为不同的目标方法应用最佳JIT编译时,性能与优化JIT编译策略的性能基本相同,节省了大约40%的编译代码大小。

英文摘要:

Modern, powerful virtual machines such as those running Java or JavaScript support multi-tier JIT compilation and optimization features to achieve their high performance. However, implementing and maintaining several compilers/optimizers that interact with each other requires hard-working VM developers. In this paper, we propose a technique to realize two-level JIT compilation in RPython without implementing several interpreters or compilers from scratch. As a preliminary realization, we created adaptive RPython, which performs both baseline JIT compilation based on threaded code and tracing JIT compilation. We also implemented a small programming language with it. Furthermore, we preliminarily evaluated the performance of that small language, and our baseline JIT compilation ran 1.77x faster than the interpreter-only execution. Furthermore, we observed that when we apply an optimal JIT compilation for different target methods, the performance was mostly the same as the one optimizing JIT compilation strategy, saving about 40 % of the compilation code size.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑