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

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 : Approximately - Are the Ruby JRuby programs faster?

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/2 ±
 k-nucleotide1/2±
 fannkuch-redux1/2 ±
 mandelbrot± ±
 fasta± ±
 regex-dna±±
 reverse-complement †±
 binary-trees20×±
 spectral-norm ±
 pidigits † 1/3
 Ruby JRuby used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/21/2±

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

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

 3 : Measurements - Are the Ruby JRuby programs faster?

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 JRuby769.43759.86275,5881137  27% 23% 24% 29%
Ruby1,491.561,491.955,0841137  22% 0% 79% 1%
 k-nucleotide 
Ruby JRuby114.40106.261,625,120449  26% 58% 6% 19%
Ruby184.06187.14501,072449  6% 93% 0% 1%
 fannkuch-redux 
Ruby JRuby2,761.54745.02279,2241426  94% 94% 92% 92%
Ruby4,399.701,129.0118,5281426  98% 96% 100% 97%
 mandelbrot 
Ruby JRuby2,789.35747.38619,484849  95% 94% 94% 93%
Ruby4,203.221,052.6051,4081019  100% 100% 100% 100%
 fasta 
Ruby JRuby150.50144.43322,420973  24% 25% 35% 23%
Ruby186.43186.7756,588973  12% 46% 35% 10%
 regex-dna 
Ruby JRuby51.5917.44889,692507  69% 71% 82% 76%
Ruby36.1312.28348,464501  65% 78% 70% 82%
 reverse-complement 
Ruby JRuby23.1016.10599,780255  58% 20% 20% 48% †
Ruby10.4510.46129,336255  0% 0% 1% 100% †
 binary-trees 
Ruby JRuby402.70106.002,243,1081123  96% 97% 95% 96%
Ruby193.7567.48114,5881123  63% 63% 66% 96%
 spectral-norm 
Ruby JRuby1,144.92300.99299,148776  96% 96% 96% 95%
Ruby648.25168.1425,624828  96% 97% 97% 97%
 pidigits 
Ruby JRuby22.0916.92277,804242  16% 59% 26% 31% †
Ruby8.648.66221,708653  1% 100% 0% 0% †
 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 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) Server VM 25.45-b02 on 1.8.0_45-b14 +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