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.38 634,548 929 29.48 70% 64% 69% 82%
pidigits
source secs mem gz cpu cpu load
Ruby JRuby 23.23 811,220 518 34.00 51% 22% 20% 57%
Java 3.12 37,444 938 3.30 2% 5% 98% 4%
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.13 199,672 2124 2.76 48% 74% 70% 54%
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.58 966,808 835 28.98 86% 84% 90% 81%
n-body
source secs mem gz cpu cpu load
Ruby JRuby 405.01 775,148 1137 418.00 21% 20% 29% 36%
Java 22.56 35,208 1424 22.65 99% 1% 1% 1%
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.38 375,988 1802 26.25 73% 97% 70% 74%
fasta
source secs mem gz cpu cpu load
Ruby JRuby 79.62 799,424 973 88.94 45% 27% 37% 13%
Java 2.32 46,816 2457 6.37 61% 60% 96% 60%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby JRuby 529.79 786,812 1426 2,011.99 96% 91% 94% 100%
Java 15.09 34,764 1282 59.26 99% 98% 98% 100%
spectral-norm
source secs mem gz cpu cpu load
Ruby JRuby 216.27 804,576 776 832.38 98% 98% 98% 98%
Java 4.25 36,364 950 16.30 97% 96% 95% 97%
mandelbrot
source secs mem gz cpu cpu load
Ruby JRuby 853.95 835,516 849 3,340.35 99% 99% 99% 99%
Java 6.08 77,056 796 23.61 97% 97% 99% 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
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)