OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
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 PHP program used compared to the fastest Ruby MRI program.
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 PHP program used compared to the fastest Ruby MRI program.
| PHP used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| mandelbrot | 1/6 | 3× | ± | |
| nsieve-bits | 1/5 | 6× | ± | |
| spectral-norm | 1/3 | 3× | ± | |
| partial-sums | 1/3 | 3× | ± | |
| reverse-complement | 1/3 | 1/2 | 2× | |
| nsieve | 1/3 | 1/3 | ± | |
| fasta | 1/2 | 1/43 | ± | |
| n-body | 1/2 | 3× | ± | |
| k-nucleotide | 1/2 | 1/3 | 2× | |
| recursive | 1/2 | ± | ± | |
| fannkuch | 1/2 | 2× | ± | |
| pidigits | ± | 1/3 | ± | |
| binary-trees | ± | 2× | ± | |
| regex-dna | ± | 2× | 2× | |
± 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 PHP program are shown for comparison against measurements of the fastest Ruby MRI program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| mandelbrot | |||||
| PHP | 9.43 | 5,488 | 395 | ||
| Ruby MRI | 59.32 | 1,652 | 349 | ||
| nsieve-bits | |||||
| PHP | 26.77 | 17,128 | 317 | ||
| Ruby MRI | 139.66 | 2,740 | 346 | ||
| spectral-norm | |||||
| PHP | 2,946.15 | 7,188 | 315 | ||
| Ruby MRI | 9,862.17 | 2,732 | 292 | ||
| partial-sums | |||||
| PHP | 17.81 | 5,504 | 367 | ||
| Ruby MRI | 59.61 | 1,640 | 362 | ||
| reverse-complement | |||||
| PHP | 2.58 | 39,696 | 508 | ||
| Ruby MRI | 8.08 | 86,340 | 266 | ||
| nsieve | |||||
| PHP | 13.31 | 10,516 | 221 | ||
| Ruby MRI | 41.51 | 30,408 | 270 | ||
| fasta | |||||
| PHP | 1,755.91 | 5,576 | 1029 | ||
| Ruby MRI | 4,202.98 | 238,156 | 744 | ||
| n-body | |||||
| PHP | 2,381.86 | 5,636 | 1289 | ||
| Ruby MRI | 4,847.57 | 1,712 | 1137 | ||
| k-nucleotide | |||||
| PHP | 79.78 | 30,336 | 818 | ||
| Ruby MRI | 160.09 | 84,616 | 420 | ||
| recursive | |||||
| PHP | 25.44 | 6,316 | 315 | ||
| Ruby MRI | 45.76 | 4,492 | 301 | ||
| fannkuch | |||||
| PHP | 7.62 | 5,500 | 484 | ||
| Ruby MRI | 12.42 | 2,864 | 326 | ||
| pidigits | |||||
| PHP | 0.20 | 1,820 | 537 | ||
| Ruby MRI | 0.30 | 6,032 | 653 | ||
| binary-trees | |||||
| PHP | 173.25 | 81,648 | 493 | ||
| Ruby MRI | 172.31 | 48,756 | 409 | ||
| regex-dna | |||||
| PHP | 9.20 | 106,752 | 675 | ||
| Ruby MRI | 7.62 | 42,824 | 396 | ||
| chameneos-redux | |||||
Remember - those are just the fastest PHP and Ruby MRI programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for PHP.
Maybe one of those other PHP programs is fastest on a different OS/machine.
Remember - those are just the fastest PHP and Ruby MRI 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.
PHP 5.2.2-pl1-gentoo (cli) (built: May 8 2007 09:51:53)
Overall Performance: PHP is rarely the bottleneck (HTML slides)
Home Page: http://www.php.net/
Download: http://www.php.net/downloads.php