/mobile Handheld Friendly website
x64 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 | ± | 1/2 | 1/3 | |
| pidigits | ± | 1/4 | 1/8 | |
| reverse-complement | 4× | 1/4 | 1/3 | |
| binary-trees | 13× | ± | ± | |
| k-nucleotide | 17× | 1/3 | 1/6 | |
| fasta | 26× | 11× | 1/2 | |
| spectral-norm | 40× | 1/3 | 1/2 | |
| fannkuch-redux | 54× | 1/4 | 1/3 | |
| n-body | 72× | 1/4 | ± | |
| mandelbrot | 172× | 1/15 | 1/3 | |
| Ruby 1.9 used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | ± | ± | 4× | 22× | 54× | 128× | 172× |
± 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 | 31.12 | 31.16 | 285,828 | 501 | 0% 0% 0% 100% |
| Java 7 -server | 22.95 | 23.00 | 561,436 | 1284 | 0% 0% 0% 100% |
| pidigits | |||||
| Ruby 1.9 | 8.97 | 8.99 | 12,520 | 242 | 0% 0% 0% 100% |
| Java 7 -server | 6.00 | 6.01 | 53,768 | 1826 | 1% 0% 0% 100% |
| reverse-complement | |||||
| Ruby 1.9 | 7.43 | 7.44 | 127,164 | 255 | 0% 0% 0% 100% |
| Java 7 -server | 1.79 | 1.83 | 514,512 | 745 | 2% 1% 2% 100% |
| binary-trees | |||||
| Ruby 1.9 | 217.58 | 217.75 | 442,092 | 413 | 0% 0% 0% 100% |
| Java 7 -server | 16.44 | 16.48 | 499,416 | 603 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| Ruby 1.9 | 495.34 | 495.60 | 166,852 | 420 | 0% 0% 0% 100% |
| Java 7 -server | 29.02 | 29.10 | 521,820 | 2431 | 0% 0% 0% 100% |
| fasta | |||||
| Ruby 1.9 | 131.35 | 135.71 | 205,908 | 762 | 0% 1% 0% 100% |
| Java 7 -server | 5.18 | 5.19 | 18,044 | 1507 | 1% 0% 1% 100% |
| spectral-norm | |||||
| Ruby 1.9 | 680.23 | 680.64 | 6,332 | 292 | 0% 0% 0% 100% |
| Java 7 -server | 16.99 | 17.00 | 18,244 | 514 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Ruby 1.9 | 3,754.58 | 3,755.61 | 4,744 | 422 | 0% 0% 0% 100% |
| Java 7 -server | 69.96 | 69.99 | 17,020 | 1282 | 0% 0% 0% 100% |
| n-body | |||||
| Ruby 1.9 | 1,630.73 | 1,631.33 | 4,736 | 1137 | 0% 0% 0% 100% |
| Java 7 -server | 22.51 | 22.51 | 16,940 | 1424 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Ruby 1.9 | 4,089.69 | 4,091.39 | 4,740 | 307 | 0% 0% 0% 100% |
| Java 7 -server | 23.74 | 23.75 | 69,696 | 796 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Java 7 -server | 0.12 | 0.12 | ? | 1443 | 0% 8% 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) [x86_64-linux]
Home Page: Ruby is…
Download: Ruby 1.9.3-p194 is released