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 29.48 1,554,812 424 66.90 59% 68% 50% 52%
Java 12.31 902,528 929 38.75 73% 76% 86% 81%
binary-trees
source secs mem gz cpu cpu load
Ruby JRuby 62.06 1,693,060 1078 230.50 92% 93% 95% 94%
Java 11.26 593,156 835 39.02 85% 88% 90% 88%
pidigits
source secs mem gz cpu cpu load
Ruby JRuby 20.84 776,548 518 34.12 28% 91% 17% 30%
Java 3.06 31,760 938 3.16 6% 3% 97% 1%
reverse-complement
source secs mem gz cpu cpu load
Ruby JRuby 9.09 2,283,300 536 25.64 80% 62% 71% 72%
Java 1.10 345,352 1661 2.40 33% 82% 53% 54%
n-body
source secs mem gz cpu cpu load
Ruby JRuby 290.75 708,196 1137 298.28 36% 30% 22% 18%
Java 21.54 27,092 1489 21.56 1% 1% 100% 1%
k-nucleotide
source secs mem gz cpu cpu load
Ruby JRuby 181.25 1,592,680 540 581.16 77% 88% 74% 84%
Java 7.93 465,372 1802 25.11 75% 75% 75% 93%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby JRuby 465.29 690,372 1426 1,666.83 99% 91% 81% 88%
Java 13.74 30,368 1282 54.12 100% 98% 98% 99%
fasta
source secs mem gz cpu cpu load
Ruby JRuby 77.16 733,140 973 84.79 43% 20% 11% 38%
Java 2.13 36,036 2457 5.66 94% 58% 59% 60%
spectral-norm
source secs mem gz cpu cpu load
Ruby JRuby 251.17 685,284 326 258.56 20% 29% 33% 23%
Java 4.29 29,884 950 16.56 96% 97% 99% 95%
mandelbrot
source secs mem gz cpu cpu load
Ruby JRuby 859.39 2,290,948 849 3,351.00 98% 98% 98% 98%
Java 7.10 90,588 796 27.92 99% 99% 98% 98%
Ruby JRuby

jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [linux-x86_64]

Java

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)