Re:Benchmarking CRuby, MJIT, YJIT, JRuby, and TruffleRuby
by eregon on Thursday January 06, 2022 @03:36PM
(#29829721)
That second sentence seems a fair assessment.
TruffleRuby does support many native (C/C++) extensions so that's rarely an issue.
But indeed in such a large codebase it's likely to depend unexpectedly on CRuby-specific behavior. And while that can be fixed it takes some effort either in TruffleRuby (to match CRuby) or in the app (e.g. to avoid relying on `RubyVM`).
> Nearly all of Stripe’s codebase is implemented in Ruby running on the default Ruby VM (YARV). Not only did we not need Java VM-level interoperability, choosing either alternative Ruby implementation would have made for a difficult migration path. Stripe relies heavily on gems with native extensions, and as you can imagine, a multi-million line Ruby codebase over time starts to depend on Ruby-the-implementation, not just Ruby-the-language.
¹: https://sorbet.org/blog/2021/07/30/open-sourcing-sorbet-comp...