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.
翻译:运行的Java或JavaScript等现代、强大的虚拟机器支持多层次JIT编集和优化功能,以取得高性能。然而,实施和维护几个相互互动的汇编/优化器需要努力工作VM开发者。在本文中,我们提出一种技术,在Rpython实现双级JIT编集,而没有从头开始使用数名口译员或编集器。初步的发现是,我们创建了适应性Rpython,它既根据线形代码进行基准JIT编集,又跟踪JIT编集。我们还使用了一个小的编程语言。此外,我们初步评估了该小语言的性能,而我们的基准JIT编集速度比仅翻译执行速度快1.77x。此外,我们注意到,当我们为不同的目标方法采用最佳JIT编集时,其性能与优化的JIT编集战略基本相同,节省了约40%的编汇代码大小。