Re:Ruby 3.3's YJIT: Faster While Using Less Memory
by claudiug on Monday December 18, 2023 @05:15PM
(#38689150)
can you share on this? :)
Re:Ruby 3.3's YJIT: Faster While Using Less Memory
by byroot on Monday December 18, 2023 @05:39PM
(#38689416)
On what, mmTk?
Matt's talk at latest Ruby Kaigi is a good intro: https://www.youtube.com/watch?v=chhNDhyPbyc
Re:Ruby 3.3's YJIT: Faster While Using Less Memory
by claudiug on Monday December 18, 2023 @06:12PM
(#38689715)
thx u!
Re:Ruby 3.3's YJIT: Faster While Using Less Memory
by ksec on Tuesday December 19, 2023 @02:01AM
(#38692711)
>On the JIT side, there is still no inlining,
Oh wow. Had no idea there was no inlining. That is potentially another 2-3x performance.
Re:Ruby 3.3's YJIT: Faster While Using Less Memory
by byroot on Tuesday December 19, 2023 @02:04AM
(#38692728)
To be slightly more correct, there is inlining but only of trivial methods that simply return an immediate value or a constant, e.g.
class NilClass
def blank?
true
end
def present?
false
end
end
But also on memory as well. There was a lot of improvements done on the Ruby garbage collector for 3.3, but there's still a lot of room for improvement, and a few fine folks at Shopify are looking into making the GC swappable so we'd be able to use mttk GCs with MRI.
As for the community caring about memory usage, I wonder how much of that has to do with the default Heroku dynos. Because it's an issue for small scale deployment. Once you scale more, you recoup a lot with CoW etc, so it's much less of a worry.