The Computer Language
Benchmarks Game

Ruby JRuby programs versus Java

by benchmark task performance

pidigits
source secs mem gz cpu cpu load
Ruby JRuby 34.41 651,944 518 34.34 0% 1% 1% 100%
Java 4.14 25,988 938 4.13 1% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby JRuby 682.08 669,712 384 681.85 0% 1% 1% 100%
Java 67.02 23,380 1257 67.00 0% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Ruby JRuby 18.80 2,240,988 509 18.73 0% 1% 1% 100%
Java 1.79 521,988 745 1.78 1% 2% 2% 100%
binary-trees
source secs mem gz cpu cpu load
Ruby JRuby 179.45 1,429,000 402 179.16 0% 2% 1% 100%
Java 16.53 511,692 584 16.51 1% 1% 0% 100%
n-body
source secs mem gz cpu cpu load
Ruby JRuby 297.31 663,560 1137 296.80 0% 1% 1% 100%
Java 24.07 23,184 1430 24.06 1% 1% 1% 100%
k-nucleotide
source secs mem gz cpu cpu load
Ruby JRuby 510.04 962,244 637 509.15 0% 1% 1% 100%
Java 36.57 512,948 1802 36.54 1% 0% 0% 100%
spectral-norm
source secs mem gz cpu cpu load
Ruby JRuby 294.74 655,348 326 294.26 0% 1% 1% 100%
Java 16.30 23,872 950 16.29 1% 0% 1% 100%
fasta
source secs mem gz cpu cpu load
Ruby JRuby 91.45 690,332 973 91.34 1% 0% 1% 100%
Java 4.77 23,400 1507 4.76 1% 1% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
Ruby JRuby 1,102.20 1,359,052 1019 1,094.98 0% 1% 1% 100%
Java 27.41 55,556 796 27.40 1% 0% 1% 100%
Ruby JRuby

jruby 9.1.0.0 (2.3.0) 2016-05-02 a633c63 Java HotSpot(TM) Server VM 25.92-b14 on 1.8.0_92-b14 +jit [linux-i386]

Java

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) Server VM (build 25.92-b14, mixed mode)