论文标题

一台口译员和一台引擎的两级及时汇编

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

论文作者

Izawa, Yusuke, Masuhara, Hidehiko, Bolz-Tereick, Carl Friedrich

论文摘要

现代强大的虚拟机,例如运行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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源