The Computer Language
Benchmarks Game

Ruby versus JRuby fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

reverse-complement
source secs mem gz busy cpu load
Ruby 20.99 1,611,616 295 27.84 98% 7% 18% 9%
JRuby 228.39 2,134,988 264 262.02 33% 9% 7% 66%
pidigits
source secs mem gz busy cpu load
Ruby 3.23 380,036 485 4.90 12% 50% 52% 37%
JRuby 25.24 780,492 518 36.63 41% 24% 33% 47%
k-nucleotide
source secs mem gz busy cpu load
Ruby 103.71 400,128 859 377.05 95% 85% 95% 89%
JRuby 224.37 1,128,760 540 745.23 87% 82% 80% 83%
regex-redux
source secs mem gz busy cpu load
Ruby 15.97 277,888 726 33.81 41% 76% 59% 36%
JRuby 28.69 1,386,976 431 67.02 49% 56% 79% 49%
fannkuch-redux
source secs mem gz busy cpu load
Ruby 303.19 26,680 1444 1,169.40 100% 91% 98% 97%
JRuby 463.20 758,556 1432 1,775.02 96% 95% 98% 94%
fasta
source secs mem gz busy cpu load
Ruby 51.74 123,240 1069 55.08 43% 44% 2% 17%
JRuby 77.29 790,908 1002 89.03 25% 27% 37% 27%
binary-trees
source secs mem gz busy cpu load
Ruby 44.61 531,600 1096 125.16 67% 72% 60% 81%
JRuby 61.62 2,342,460 1083 223.23 89% 88% 92% 92%
spectral-norm
source secs mem gz busy cpu load
Ruby 150.32 26,188 839 585.35 97% 97% 97% 97%
JRuby 155.30 760,752 776 607.02 98% 98% 98% 98%
mandelbrot
source secs mem gz busy cpu load
Ruby 335.33 66,188 931 1,339.92 100% 100% 100% 100%
JRuby 310.75 840,956 973 1,223.91 98% 98% 99% 98%
n-body
source secs mem gz busy cpu load
Ruby 374.51 25,668 1137 387.63 67% 20% 2% 14%
JRuby 238.40 784,244 1137 255.90 40% 24% 17% 26%
Ruby

ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
--jit

JRuby

jruby 9.2.9.0 (2.5.7) 2019-10-30 458ad3e OpenJDK 64-Bit Server VM 13+33 on 13+33 +jit [linux-x86_64]