Ruby 3.0 has better CPU cache efficiency • Even Ruby 3 has slow versions ◦ MJIT doesn't work properly in Ruby 3.0.1 ◦ Ruby 3.0.0 is OK, but others might have throttling issues
GC.compact or TracePoint is used ◦ Ruby 3.1 shows "JIT cancel" on --jit-verbose=1 when it happens • However, Ruby 3.1 supported TracePoint :class events for Zeitwerk • MJIT has performance issues when you have Ractors
is running, the interpreter becomes slower ◦ We've found no workaround so far • So be sure to see the end of compilation with --jit-verbose=1 ◦ This can take some minutes
stages: ◦ Fragmented code with full optimizations ◦ Fragmented code with partial optimizations ◦ Compacted code with partial optimizations • All methods should be in the last stage to see the peak performance
◦ No, we contribute to each other's project as well • Multi-tier JIT? ◦ Efficiently mixing the code of MJIT and YJIT might be hard ◦ At least MJIT needs to be replaced by MIR for better control
YJIT cannot inline and optimize C methods as is ◦ MJIT has Ruby → C inlining, but not C → Ruby yet ◦ Rewrite more C methods to Ruby and/or integrate MIR