YJIT: a basic block versioning JIT compiler for CRuby

YJIT: a basic block versioning JIT compiler for CRuby
复制标题

YJIT:CRuby 的基本块版本控制 JIT 编译器

DOI:
--
复制
发表时间:
2021
期刊:
VMIL@SPLASH
影响因子:
--
通讯作者:
J. Hawthorn
J. Hawthorn
中科院分区:
--
文献类型:
--
作者:
Maxime Chevalier;Noah Gibbs;J. Boussier;Si Xing Wu;Aaron Patterson;Kevin Newton;J. Hawthorn

文献摘要

被引文献

相似文献

Ruby是一种动态类型的编程语言,具有广泛的功能,随着现代Web的兴起而越来越受欢迎,并且仍然是许多广泛使用的网站实现的核心。CRuby是该语言的默认实现,具有一个称为MJIT的JIT编译器,但开发人员通常不会在生产环境中启用它,因为它并不总是在现实世界的软件上产生性能改进。独立重新实现Ruby语言的尝试,如JRuby和TruffleRuby,在基准测试中表现出令人印象深刻的性能结果,但在支持语言的新功能方面往往落后于CRuby,这限制了它们的采用。我们介绍了YJIT,一个新的JIT编译器内置于CRuby的基础上,一个懒惰的基本块版本控制(LBBV)架构。我们表明,虽然我们的编译器不匹配的峰值性能的TruffleRuby,它提供了近100%的兼容性与现有的Ruby代码,令人印象深刻的快速预热,并从15%到19%的加速相当大的基准测试基于真实世界的软件。
Ruby is a dynamically typed programming language with a large breadth of features which has grown in popularity with the rise of the modern web, and remains at the core of the implementation of many widely-used websites. CRuby, the default implementation of the language, features a JIT compiler known as MJIT, but developers often do not enable it in production environments, because it does not always yield performance improvements on real-world software. Attempts to independently reimplement the Ruby language, such as JRuby and TruffleRuby have shown impressive performance results on benchmarks, but often lag behind CRuby when it comes to supporting new additions to the language, which limits their adoption. We introduce YJIT, a new JIT compiler built inside CRuby based on a Lazy Basic Block Versioning (LBBV) architecture. We show that while our compiler does not match the peak performance of TruffleRuby, it offers near-100% compatibility with existing Ruby code, impressively fast warmup, and speedups from 15% to 19% on sizeable benchmarks based on real-world software.