Closed maximecb closed 9 months ago
@jhawthorn 🤠
FWIW I was curious about the performance of this benchmark on TruffleRuby, here is what I got locally:
$ ruby -Iharness-warmup benchmarks/ruby-xor.rb
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
iter # 12: 594ms, mad=0.0010/0.0012, median=594ms
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) +YJIT [x86_64-linux]
iter # 27: 188ms, mad=0.0004/0.0027, median=188ms
truffleruby 23.1.1, like ruby 3.2.2, Oracle GraalVM JVM [x86_64-linux]
iter # 90: 52ms, mad=0.0024/0.0090, median=52ms
Current performance on my MacBook M1:
It would be nice if we could get this to run 10x faster than the interpreter. I plan to add more specialized C function codegen. The improved register allocator will probably help a lot too.
Relevant stats:
So we're basically just missing xor support and
setbyte
to inline 100% of the calls in this. I plan to look at these in the coming days :)