Or do you mean AOT compiling Ruby code to JVM bytecode? That's possible but the performance would likely be pretty bad, not much faster than an interpreter and then no much point to compile the Ruby code as it would mean a bigger native image.
Or do you mean AOT compiling Ruby code to JVM bytecode? That's possible but the performance would likely be pretty bad, not much faster than an interpreter and then no much point to compile the Ruby code as it would mean a bigger native image.
CRuby 3.5 RactorPool + ZJIT: 24.8s
(JRuby RactorPool is NG because JRuby doesn't support C extensions, needed by atomic-ruby)
CRuby 3.5 RactorPool + ZJIT: 24.8s
(JRuby RactorPool is NG because JRuby doesn't support C extensions, needed by atomic-ruby)
@dentarg.bsky.social Thanks for trying this!
On my machine for that benchmark with N=10000:
CRuby 3.5 RactorPool: 27s
JRuby 10.0.2 FixedThreadPool: 5.6s (4.8x faster)
TruffleRuby 25.0 RactorPool: 3.7s (~7.3x faster)
TruffleRuby 25.0 FixedThreadPool: 3.7s too
@dentarg.bsky.social Thanks for trying this!
On my machine for that benchmark with N=10000:
CRuby 3.5 RactorPool: 27s
JRuby 10.0.2 FixedThreadPool: 5.6s (4.8x faster)
TruffleRuby 25.0 RactorPool: 3.7s (~7.3x faster)
TruffleRuby 25.0 FixedThreadPool: 3.7s too
And sorry for the spam, I should have checked more before posting.
And sorry for the spam, I should have checked more before posting.
$ ruby -W0 -ratomic-ruby -e 'A = Atom.new(Object.new); p A.value; Ractor.new { p A.value; p A.value.frozen? }.join'
#<Object:0x00007f6a91e11260>
#<Object:0x00007f6a91e11260>
true
$ ruby -W0 -ratomic-ruby -e 'A = Atom.new(Object.new); p A.value; Ractor.new { p A.value; p A.value.frozen? }.join'
#<Object:0x00007f6a91e11260>
#<Object:0x00007f6a91e11260>
true
```
ruby -W0 -ratomic-ruby -e 'A = Atom.new(Object.new); p A.value; Ractor.new { p A.value }.join'
#<Object:0x00007f823a2212e0>
#<Object:0x00007f823a2212e0>
```
```
ruby -W0 -ratomic-ruby -e 'A = Atom.new(Object.new); p A.value; Ractor.new { p A.value }.join'
#<Object:0x00007f823a2212e0>
#<Object:0x00007f823a2212e0>
```
(well, ignoring Atom but that looks safe)
> Currently requires Ruby 3.5
bsky.app/profile/ereg... might help for that :)
I might give it a try to run the ractor-pool tests with that on other Rubies.
(well, ignoring Atom but that looks safe)
> Currently requires Ruby 3.5
bsky.app/profile/ereg... might help for that :)
I might give it a try to run the ractor-pool tests with that on other Rubies.
The implementation passes most Ractor tests, see github.com/eregon/racto... for details
The implementation passes most Ractor tests, see github.com/eregon/racto... for details
True but it feels like a recurring situation that most Rubyists are in agreement and yet very few comment on the issue tracker and core committers potentially being unaware of that. I did polls in the past, it's far from perfect but got some idea of who is for/against.
True but it feels like a recurring situation that most Rubyists are in agreement and yet very few comment on the issue tracker and core committers potentially being unaware of that. I did polls in the past, it's far from perfect but got some idea of who is for/against.
I don't get the point to jump to 4.0 this year, there seems to be no breaking change and no big feature that is production-ready.
I don't get the point to jump to 4.0 this year, there seems to be no breaking change and no big feature that is production-ready.
rubycentral.org/news/rubygem...