/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
Each chart bar shows, for one unidentified benchmark, how much the fastest Ruby 2.0 program used compared to the fastest Python 3 program.
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.
Each table row shows, for one named benchmark, how much the fastest Ruby 2.0 program used compared to the fastest Python 3 program.
| Ruby 2.0 used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| spectral-norm | 1/2 | ± | ± | |
| binary-trees | 1/2 | 1/3 | ± | |
| fasta | 1/2 | 36× | ± | |
| n-body | ± | ± | ± | |
| mandelbrot | ± | 1/16 | 1/3 | |
| regex-dna | ± | 2× | ± | |
| k-nucleotide | ± | 1/2 | ± | |
| fannkuch-redux | ± | ± | ± | |
| reverse-complement | 2× | 1/5 | ± | |
| pidigits | 4× | 2× | ± | |
| Ruby 2.0 used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 1/2 | 1/2 | 1/2 | ± | ± | 3× | 4× |
± read the measurements and then read the program source code.
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 2.0 program are shown for comparison against measurements of the fastest Python 3 program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| spectral-norm | |||||
| Ruby 2.0 | 320.35 | 320.45 | 7,732 | 326 | 0% 0% 0% 100% |
| Python 3 | 787.37 | 787.62 | 7,096 | 328 | 0% 0% 0% 100% |
| binary-trees | |||||
| Ruby 2.0 | 199.54 | 199.69 | 436,916 | 439 | 0% 0% 0% 100% |
| Python 3 | 480.36 | 480.87 | 1,209,444 | 626 | 0% 0% 0% 100% |
| fasta | |||||
| Ruby 2.0 | 106.88 | 106.93 | 223,864 | 772 | 0% 0% 0% 100% |
| Python 3 | 217.54 | 221.68 | 6,216 | 792 | 0% 0% 1% 100% |
| n-body | |||||
| Ruby 2.0 | 666.58 | 666.72 | 6,172 | 1137 | 0% 0% 0% 100% |
| Python 3 | 916.32 | 916.59 | 6,296 | 1181 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Ruby 2.0 | 1,832.09 | 1,832.55 | 6,136 | 307 | 0% 0% 0% 100% |
| Python 3 | 1,729.80 | 1,730.60 | 100,660 | 777 | 0% 0% 0% 100% |
| regex-dna | |||||
| Ruby 2.0 | 30.07 | 30.09 | 393,896 | 417 | 0% 0% 0% 100% |
| Python 3 | 21.75 | 21.77 | 200,012 | 424 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| Ruby 2.0 | 544.77 | 545.08 | 227,564 | 540 | 0% 0% 0% 100% |
| Python 3 | 388.14 | 388.47 | 487,132 | 647 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Ruby 2.0 | 3,341.03 | 3,341.91 | 6,148 | 384 | 0% 0% 0% 100% |
| Python 3 | 2,348.56 | 2,349.26 | 6,152 | 385 | 0% 0% 0% 100% |
| reverse-complement | |||||
| Ruby 2.0 | 9.03 | 9.04 | 128,252 | 255 | 0% 0% 0% 100% |
| Python 3 | 5.38 | 5.40 | 675,272 | 325 | 0% 0% 0% 100% |
| pidigits | |||||
| Ruby 2.0 | 9.48 | 9.49 | 14,988 | 242 | 0% 0% 1% 100% |
| Python 3 | 2.40 | 2.40 | 6,928 | 255 | 2% 0% 0% 100% |
| fasta-redux | |||||
Remember - those are just the fastest Ruby 2.0 and Python 3 programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Ruby 2.0.
Maybe one of those other Ruby 2.0 programs is fastest on a different OS/machine.
Remember - those are just the fastest Ruby 2.0 and Python 3 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 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
Home Page: Ruby is…
Download: Ruby 2.0.0-p0 is released