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 JavaScript V8 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 JavaScript V8 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
 k-nucleotide±65×1/3
 reverse-complement1/3
 binary-trees±
 fasta ±
 regex-dna14×±
 fannkuch-redux16× ±
 n-body18× ±
 spectral-norm32× ±
 Ruby JRuby used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±10×17×32×32×

± 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 JavaScript V8 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
Ruby JRuby112.13112.231,631,204449  0% 1% 1% 100%
JavaScript V8120.41120.5425,2481249  1% 1% 1% 100%
 reverse-complement 
Ruby JRuby23.2123.24587,052255  0% 1% 1% 100%
JavaScript V87.387.39268,372787  1% 3% 4% 100%
 binary-trees 
Ruby JRuby187.95188.201,641,316402  0% 1% 1% 100%
JavaScript V841.4941.55467,564467  0% 0% 1% 100%
 fasta 
Ruby JRuby155.47156.27326,424973  0% 1% 1% 100%
JavaScript V822.9222.9533,720956  0% 1% 1% 100%
 regex-dna 
Ruby JRuby48.7248.75798,716343  0% 1% 0% 100%
JavaScript V83.543.55432,072405  1% 0% 1% 100%
 fannkuch-redux 
Ruby JRuby1,121.591,121.95274,216384  0% 1% 1% 100%
JavaScript V871.3671.3910,572539  1% 0% 0% 100%
 n-body 
Ruby JRuby761.20762.20276,5561137  0% 1% 1% 100%
JavaScript V842.9943.0113,1081287  1% 0% 0% 100%
 spectral-norm 
Ruby JRuby500.57501.30288,056326  0% 1% 1% 100%
JavaScript V815.7115.7214,264361  0% 1% 0% 100%
 pidigits 
Ruby JRuby8.078.09183,100242  0% 2% 0% 100%
No program
 mandelbrot 
Ruby JRuby16.5616.59276,172307  0% 0% 1% 100%
JavaScript V8Bad Output
 fasta-redux
   No programs

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

Remember - those are just the fastest Ruby JRuby and JavaScript V8 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 JavaScript V8 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