1 : Are the Ruby JRuby programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Ruby JRuby program used compared to the fastest Ruby program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the Ruby JRuby programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Ruby JRuby program used compared to the fastest Ruby program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Ruby JRuby used what fraction? used how many times more? 
Benchmark Time Memory Code
 n-body1/4 ±
 k-nucleotide1/2±
 mandelbrot1/2 ±
 fannkuch-redux± ±
 fasta± ±
 regex-dna±±
 pidigits † ±
 reverse-complement †10×±
 spectral-norm † 1/3
 binary-trees1/3
 Ruby JRuby used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/41/2±

† possible mismatch - one-core program compared to multi-core program.

± read the measurements and then read the program source code.

 3 : Are the Ruby JRuby programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest Ruby JRuby program are shown for comparison against measurements of the fastest Ruby program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 n-body 
Ruby JRuby343.21335.01698,0361137  17% 42% 25% 20%
Ruby1,491.561,491.955,0841137  22% 0% 79% 1%
 k-nucleotide 
Ruby JRuby109.3499.111,917,404449  21% 5% 6% 80%
Ruby184.06187.14501,072449  6% 93% 0% 1%
 mandelbrot 
Ruby JRuby2,697.25690.842,284,264866  98% 98% 98% 98%
Ruby4,203.221,052.6051,4081019  100% 100% 100% 100%
 fannkuch-redux 
Ruby JRuby2,812.25781.51784,8201426  95% 89% 88% 90%
Ruby4,399.701,129.0118,5281426  98% 96% 100% 97%
 fasta 
Ruby JRuby270.58264.02635,484760  14% 14% 43% 33%
Ruby240.42240.855,124987  45% 20% 29% 9%
 regex-dna 
Ruby JRuby48.9516.67925,680507  77% 68% 76% 74%
Ruby36.1312.28348,464501  65% 78% 70% 82%
 pidigits 
Ruby JRuby23.5317.05637,144242  64% 38% 20% 19% †
Ruby11.2011.22147,624240  82% 1% 19% 1% †
 reverse-complement 
Ruby JRuby24.2216.691,309,952255  47% 51% 32% 16% †
Ruby10.4510.46129,336255  0% 0% 1% 100% †
 spectral-norm 
Ruby JRuby290.28282.22647,796326  26% 36% 18% 24% †
Ruby648.25168.1425,624828  96% 97% 97% 97% †
 binary-trees 
Ruby JRuby711.02312.81842,440439  57% 66% 54% 52%
Ruby193.7567.48114,5881123  63% 63% 66% 96%
 fasta-redux 
No program
Ruby1.961.975,704772  97% 1% 1% 3%

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Ruby JRuby programs for these benchmarks?

Remember - those are just the fastest Ruby JRuby and Ruby programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Ruby JRuby.

Maybe one of those other Ruby JRuby programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Ruby JRuby and Ruby programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 Ruby JRuby : everything is an object scripting for jvm 

jruby 9.0.0.0.pre1 (2.2.0p0) 2015-01-20 d537cab Java HotSpot(TM) Server VM 25.25-b02 on 1.8.0_25-b17 +jit [linux-i386]

Home Page: 100% Pure-Java Implementation of the Ruby Programming Language

JRuby Performance Tuning

"So You Want To Optimize Ruby" (So You want to optimize an implementation of the Ruby language.)

Download: http://jruby.org/download

Revised BSD license

  Home   Conclusions   License   Play