from Hacker News

Rust YJIT is complete – it passes all the CRuby tests

by gotts on 4/19/22, 10:19 PM with 1 comments

  • by gotts on 4/19/22, 10:19 PM

    Alan Wu: In December 2021, we opened an issue to solicit feedback regarding the porting of the YJIT codebase from C99 to Rust. There were some reservations, but this project was given the go ahead by Ruby core developers and Matz. Since then, we have successfully completed the port of YJIT to Rust. We are opening this pull request to upstream Rust YJIT, effectively replacing the C version of YJIT.

    The new Rust version of YJIT has reached parity with the C version, in that it passes all the CRuby tests, is able to run all of the YJIT benchmarks, and performs similarly to the C version (because it works the same way and largely generates the same machine code). We've even incorporated some design improvements, such as a more fine-grained constant invalidation mechanism which we expect will make a big difference in Ruby on Rails applications.