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.16 927,212 929 37.28 73% 81% 75% 78%
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,088 938 3.16 0% 3% 9% 92%
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.11 345,308 1661 2.44 33% 58% 54% 80%
n-body
source secs mem gz cpu cpu load
Ruby JRuby 290.75 708,196 1137 298.28 36% 30% 22% 18%
Java 21.50 27,240 1489 21.52 1% 1% 100% 0%
binary-trees
source secs mem gz cpu cpu load
Ruby JRuby 174.71 1,540,044 439 249.90 18% 88% 23% 20%
Java 11.52 643,924 889 40.54 89% 92% 85% 89%
k-nucleotide
source secs mem gz cpu cpu load
Ruby JRuby 181.25 1,592,680 540 581.16 77% 88% 74% 84%
Java 8.02 467,004 1802 25.57 76% 98% 73% 74%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby JRuby 465.29 690,372 1426 1,666.83 99% 91% 81% 88%
Java 17.74 30,048 1282 69.90 98% 98% 100% 99%
fasta
source secs mem gz cpu cpu load
Ruby JRuby 77.16 733,140 973 84.79 43% 20% 11% 38%
Java 2.14 36,192 2457 5.68 71% 58% 62% 77%
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 31,428 950 16.56 97% 96% 98% 97%
mandelbrot
source secs mem gz cpu cpu load
Ruby JRuby 859.39 2,290,948 849 3,351.00 98% 98% 98% 98%
Java 5.89 89,504 796 23.08 98% 98% 98% 99%
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)