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

用于解释器优化的推测分段

Speculative Staging for Interpreter Optimization

Stefan Brunthaler

摘要:

解释器有一个比即时编译器性能低的坏名声。我们提出了一种新的方法来构建高性能的解释器,这是特别有效的执行动态类型的程序设计语言。其关键思想是结合投机分期优化解释器指令的一种新的技术,增量和迭代concerting他们在运行时。本文介绍了从现有的解释器指令派生优化指令背后的概念-逐步剥离复杂性层。当编译解释器时,这些优化的导数将与原始解释器指令一起编译。因此,我们的技术是可移植的建设,因为它利用现有的编译器的后端。在运行时,我们使用指令替换从解释器的原始和昂贵的指令优化指令衍生物,以加快执行。我们的技术将高性能与解释器的简单性和可移植性结合在一起-我们报告说,我们的优化使CPython解释器的速度提高了四倍以上,我们的解释器缩小了PyPy的即时编译器之间的差距,有时甚至优于PyPy的即时编译器。

英文摘要:

Interpreters have a bad reputation for having lower performance than just-in-time compilers. We present a new way of building high performance interpreters that is particularly effective for executing dynamically typed programming languages. The key idea is to combine speculative staging of optimized interpreter instructions with a novel technique of incrementally and iteratively concerting them at run-time. This paper introduces the concepts behind deriving optimized instructions from existing interpreter instructions---incrementally peeling off layers of complexity. When compiling the interpreter, these optimized derivatives will be compiled along with the original interpreter instructions. Therefore, our technique is portable by construction since it leverages the existing compiler's backend. At run-time we use instruction substitution from the interpreter's original and expensive instructions to optimized instruction derivatives to speed up execution. Our technique unites high performance with the simplicity and portability of interpreters---we report that our optimization makes the CPython interpreter up to more than four times faster, where our interpreter closes the gap between and sometimes even outperforms PyPy's just-in-time compiler.

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

↑