The Computer Language
Benchmarks Game

Ruby JRuby programs versus Java

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Ruby JRuby 34.34 1,275,904 424 82.77 51% 48% 69% 75%
Java 10.34 627,224 929 29.88 74% 72% 65% 79%
pidigits
source secs mem gz cpu cpu load
Ruby JRuby 23.23 811,220 518 34.00 51% 22% 20% 57%
Java 3.12 36,788 938 3.31 6% 3% 4% 96%
binary-trees
source secs mem gz cpu cpu load
Ruby JRuby 67.41 2,442,336 1078 227.30 91% 86% 82% 80%
Java 8.34 893,008 835 28.20 87% 79% 96% 81%
reverse-complement
source secs mem gz cpu cpu load
Ruby JRuby 8.77 2,206,072 509 24.43 76% 66% 70% 69%
Java 1.03 191,064 2183 2.31 52% 57% 43% 74%
n-body
source secs mem gz cpu cpu load
Ruby JRuby 405.01 775,148 1137 418.00 21% 20% 29% 36%
Java 22.10 33,136 1429 22.20 31% 1% 1% 70%
k-nucleotide
source secs mem gz cpu cpu load
Ruby JRuby 246.68 1,127,988 637 930.73 94% 97% 94% 93%
Java 8.70 375,568 1812 27.17 80% 72% 74% 88%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby JRuby 529.79 786,812 1426 2,011.99 96% 91% 94% 100%
Java 17.26 32,116 1282 67.75 98% 99% 97% 99%
fasta
source secs mem gz cpu cpu load
Ruby JRuby 79.62 799,424 973 88.94 45% 27% 37% 13%
Java 2.33 43,924 2473 6.07 53% 71% 63% 74%
spectral-norm
source secs mem gz cpu cpu load
Ruby JRuby 216.27 804,576 776 832.38 98% 98% 98% 98%
Java 4.23 34,472 950 16.27 96% 97% 97% 96%
mandelbrot
source secs mem gz cpu cpu load
Ruby JRuby 853.95 835,516 849 3,340.35 99% 99% 99% 99%
Java 6.04 76,528 796 23.34 98% 97% 97% 97%
Ruby JRuby

jruby 9.1.13.0 (2.3.3) 2017-09-06 8e1c115 Java HotSpot(TM) 64-Bit Server VM 9+181 on 9+181 +jit [linux-x86_64]

Java

java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)