logoalt Hacker News

byroottoday at 9:43 AM1 replyview on HN

They already truly run in parallel in Ruby 4.0. The overwhelming majority of contention points have been removed in the last yet.

Ruby::Box wouldn't help reducing contention further, they actually make it worse because with Ruby::Box classes and modules and an extra indirection to go though.

The one remaining contention point is indeed garbage collection. There is a plan for Ractor local GC, but it wasn''t sufficiently ready for Ruby 4.0.


Replies

WJWtoday at 10:01 AM

I know they run truly parallel when they're doing work, but GC still stops the world, right?

Assuming you mean "because with Ruby::Box classes and modules have an extra indirection to go though." in the second paragraph, I don't understand why that would be necessary. Can't you just have completely separate boxes with their own copies of all classes etc, or does that use too much memory? (Maybe some COW scheme might work, doodling project for the holidays acquired haha)

Anyway, very cool work and I hope it keeps improving! Thanks for 4.0 byroot!

show 1 reply