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 ±
 fannkuch-redux1/2 ±
 mandelbrot1/2 ±
 fasta± ±
 regex-dna±±
 binary-trees±1/3
 pidigits †± ±
 spectral-norm± ±
 reverse-complement †±
 k-nucleotide †1/2
 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 JRuby394.47387.28711,9601137  13% 32% 40% 19%
Ruby1,585.811,586.245,4841137  0% 1% 38% 63%
 fannkuch-redux 
Ruby JRuby2,162.53610.69644,8801426  77% 92% 100% 86%
Ruby4,979.101,283.8219,9161426  93% 98% 100% 98%
 mandelbrot 
Ruby JRuby2,654.92680.822,264,992866  98% 98% 98% 98%
Ruby5,099.261,288.6480,676925  100% 99% 99% 99%
 fasta 
Ruby JRuby234.92229.49610,508760  31% 16% 21% 38%
Ruby235.44235.545,388987  47% 18% 37% 0%
 regex-dna 
Ruby JRuby54.8218.63797,864507  86% 67% 66% 77%
Ruby37.6113.00115,136529  64% 61% 75% 91%
 binary-trees 
Ruby JRuby183.26110.20885,848402  67% 31% 27% 43%
Ruby221.0176.21130,9361123  66% 97% 63% 65%
 pidigits 
Ruby JRuby21.7616.42635,540242  14% 14% 11% 95% †
Ruby11.3111.3373,884242  1% 1% 1% 100% †
 spectral-norm 
Ruby JRuby1,009.32258.29644,372776  99% 98% 98% 98%
Ruby677.28175.9127,760828  96% 96% 96% 97%
 reverse-complement 
Ruby JRuby25.5619.061,233,648255  14% 61% 49% 12% †
Ruby11.0311.04129,928255  0% 1% 100% 0% †
 k-nucleotide 
Ruby JRuby100.3592.161,824,852449  25% 29% 48% 9% †
Ruby52.7817.28356,824996  69% 71% 69% 98% †
 fasta-redux 
No program
Ruby1.951.976,600772  97% 0% 1% 5%

† 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 1.7.16.1 (1.9.3p392) 2014-10-28 4e93f31 on Java HotSpot(TM) Server VM 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