I dug into CRuby and YJIT to better understand a recent, popular synthetic benchmark run against various languages. It was alot of fun to investigate how YJIT and CRuby work together!
https://jpcamara.com/2024/12/01/speeding-up-ruby.html
@k0kubun.com @timtilberg.bsky.social
https://jpcamara.com/2024/12/01/speeding-up-ruby.html
@k0kubun.com @timtilberg.bsky.social
Comments
By blaming "def times; ...; end" in numeric.rb, you can find out about the rationales .
...
...
I think the core of how their internals exactly work will take a few reads to fully understand, but this is great
Since I use Windows most of the time and YJIT doesn't work on Windows, it bothers me a bit that rewriting these in Ruby may be good for YJIT but may be slower without... it's conjecture, of course!
https://github.com/jpcamara/ruby_microbench
I’m gonna submit a PR to add it to the original languages repo as well