/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one core |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each chart bar shows, for one unidentified benchmark, how much the fastest Ruby 1.9 program used compared to the fastest Java 7 -server program.
Look at speed another way - look at a box plot of Time-used data.
This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each table row shows, for one named benchmark, how much the fastest Ruby 1.9 program used compared to the fastest Java 7 -server program.
| Ruby 1.9 used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| regex-dna | 2× | 1/2 | 1/3 | |
| pidigits | 3× | ± | 1/4 | |
| reverse-complement | 4× | 1/3 | 1/3 | |
| binary-trees | 15× | 1/2 | ± | |
| k-nucleotide | 15× | 1/2 | 1/6 | |
| fasta | 28× | 12× | 1/2 | |
| spectral-norm | 39× | 1/4 | 1/3 | |
| n-body | 58× | 1/4 | ± | |
| fannkuch-redux | 59× | 1/4 | 1/3 | |
| mandelbrot | 147× | 1/20 | 1/3 | |
| Ruby 1.9 used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 2× | 2× | 4× | 22× | 58× | 137× | 147× |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.
For each named benchmark, measurements of the fastest Ruby 1.9 program are shown for comparison against measurements of the fastest Java 7 -server program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| regex-dna | |||||
| Ruby 1.9 | 37.66 | 37.70 | 294,988 | 501 | 0% 0% 0% 100% |
| Java 7 -server | 21.58 | 21.61 | 557,612 | 1284 | 0% 0% 0% 100% |
| pidigits | |||||
| Ruby 1.9 | 16.93 | 16.95 | 11,424 | 242 | 1% 0% 0% 100% |
| Java 7 -server | 5.44 | 5.44 | 16,944 | 938 | 0% 0% 0% 100% |
| reverse-complement | |||||
| Ruby 1.9 | 8.50 | 8.52 | 174,748 | 255 | 1% 0% 0% 100% |
| Java 7 -server | 1.87 | 1.90 | 511,340 | 745 | 1% 1% 0% 100% |
| binary-trees | |||||
| Ruby 1.9 | 227.56 | 227.67 | 210,384 | 413 | 0% 0% 0% 100% |
| Java 7 -server | 15.64 | 15.68 | 506,672 | 603 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| Ruby 1.9 | 521.71 | 521.96 | 157,836 | 420 | 0% 0% 0% 100% |
| Java 7 -server | 33.81 | 33.93 | 336,388 | 2431 | 0% 0% 0% 100% |
| fasta | |||||
| Ruby 1.9 | 135.43 | 136.85 | 179,756 | 762 | 0% 0% 0% 100% |
| Java 7 -server | 4.92 | 4.92 | 14,828 | 1507 | 1% 0% 0% 100% |
| spectral-norm | |||||
| Ruby 1.9 | 630.77 | 630.95 | 4,196 | 292 | 0% 0% 0% 100% |
| Java 7 -server | 16.21 | 16.21 | 14,860 | 950 | 0% 0% 0% 100% |
| n-body | |||||
| Ruby 1.9 | 1,401.38 | 1,401.75 | 3,664 | 1137 | 0% 0% 0% 100% |
| Java 7 -server | 24.32 | 24.33 | 13,744 | 1424 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Ruby 1.9 | 4,228.37 | 4,229.75 | 3,404 | 422 | 0% 0% 0% 100% |
| Java 7 -server | 71.27 | 71.29 | 13,856 | 1282 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Ruby 1.9 | 3,944.74 | 3,946.01 | 3,400 | 307 | 0% 0% 0% 100% |
| Java 7 -server | 26.86 | 26.87 | 67,760 | 796 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Java 7 -server | 0.11 | 0.11 | ? | 1443 | 0% 0% 0% 100% |
Remember - those are just the fastest Ruby 1.9 and Java 7 -server programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Ruby 1.9.
Maybe one of those other Ruby 1.9 programs is fastest on a different OS/machine.
Remember - those are just the fastest Ruby 1.9 and Java 7 -server 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.
online book Programming Ruby: The Pragmatic Programmers Guide
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
Home Page: Ruby is…
Download: Ruby 1.9.3-p194 is released