YJIT: Building a New JIT Compiler Inside CRubyMoreVMs Invited Talk
Ruby is a dynamically-typed programming language with elements of object-oriented and functional programming. This language was used to implement the backend of many popular online services, such as Shopify, GitHub, AirBnB, and Twitch. Each of these services requires a large number of servers to run, and so there is a strong desire from multiple large stakeholders to optimize Ruby’s performance. There are currently multiple ongoing attempts to write JIT compilers for the language. However, Ruby’s highly dynamic nature makes it challenging to generate efficient compiled code, and sometimes surprisingly difficult to outperform CRuby’s interpreter.
In this talk, I will present YJIT, an open source project led by a small team of developers at Shopify to incrementally build a new JIT compiler inside CRuby, the mainstream Ruby implementation, with the goal of seamless integration with existing Ruby code. I will be briefly discussing the landscape of existing Ruby JIT compilers and presenting the approach we are taking to implement YJIT, which is based on lazy basic block versioning, a JIT compiler architecture developed during my PhD. With this approach, we are trying to find a sweet spot in terms of implementation complexity and performance of the generated code. We are at an early stage in the YJIT project, and so I am coming to you not just to present the architecture, but also to discuss design tradeoffs and to solicit feedback from compiler and virtual machine design experts.
Tue 23 MarDisplayed time zone: Belfast change
12:55 - 14:30 | Optimizing Dynamic LanguagesMoreVMs at Virtual Space A Chair(s): Fabio Niephaus Hasso Plattner Institute, University of Potsdam | ||
12:55 5mDay opening | Welcome MoreVMs | ||
13:00 60mTalk | YJIT: Building a New JIT Compiler Inside CRubyMoreVMs Invited Talk MoreVMs Maxime Chevalier-Boisvert Shopify Media Attached | ||
14:00 30mTalk | Caching Hidden Classes for Pre-transitioning Object Memory Layout in JavaScript MoreVMs Tomoharu Ugawa University of Tokyo, Stefan Marr University of Kent, Richard Jones University of Kent Media Attached |