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/3 ±
 k-nucleotide1/2±
 fannkuch-redux1/2 ±
 mandelbrot1/2 ±
 pidigits †± ±
 spectral-norm ±
 reverse-complement †10×±
 binary-trees1/3
 regex-dna15×1,296×±
 Ruby JRuby used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/31/31/2±15×

† 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 JRuby469.16461.85655,2681137  36% 21% 24% 23%
Ruby1,491.561,491.955,0841137  22% 0% 79% 1%
 k-nucleotide 
Ruby JRuby108.1399.062,186,060449  50% 27% 26% 7%
Ruby184.06187.14501,072449  6% 93% 0% 1%
 fannkuch-redux 
Ruby JRuby2,619.96725.28661,1681426  91% 89% 98% 86%
Ruby4,399.701,129.0118,5281426  98% 96% 100% 97%
 mandelbrot 
Ruby JRuby2,662.51685.692,253,832849  98% 98% 98% 98%
Ruby4,203.221,052.6051,4081019  100% 100% 100% 100%
 pidigits 
Ruby JRuby22.5516.69638,384242  26% 41% 40% 30% †
Ruby11.2011.22147,624240  82% 1% 19% 1% †
 spectral-norm 
Ruby JRuby1,000.56258.84656,984776  97% 98% 97% 98%
Ruby648.25168.1425,624828  96% 97% 97% 97%
 reverse-complement 
Ruby JRuby22.9416.191,305,544255  43% 43% 44% 17% †
Ruby10.4510.46129,336255  0% 0% 1% 100% †
 binary-trees 
Ruby JRuby589.21265.08844,504439  80% 55% 45% 44%
Ruby193.7567.48114,5881123  63% 63% 66% 96%
 regex-dna 
Ruby JRuby7.423.17337,056343  67% 43% 79% 48%
Ruby0.450.21260501  50% 43% 75% 57%
 fasta-redux 
No program
Ruby1.961.975,704772  97% 1% 1% 3%
 fasta 
Ruby JRubyFailed
Ruby2.462.465,240987  2% 0% 0% 100%

† 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.pre2 (2.2.2) 2015-04-28 2755ae0 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