÷

 Step 1 : Are the PHP programs faster? At a glance.

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.


 Step 2 : Are the PHP programs faster? Approximately.

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
 mandelbrot1/6±
 nsieve-bits1/5±
 spectral-norm1/3±
 partial-sums1/3±
 reverse-complement1/31/2
 nsieve1/31/3±
 fasta1/21/43±
 n-body1/2±
 k-nucleotide1/21/3
 recursive1/2±±
 fannkuch1/2±
 pidigits±1/3±
 binary-trees±±
 regex-dna±

± read the measurements and then read the program source code.

 Step 3 : Are the PHP programs faster? Measurements.

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 
PHP9.435,488395  
Ruby MRI59.321,652349  
 nsieve-bits 
PHP26.7717,128317  
Ruby MRI139.662,740346  
 spectral-norm 
PHP2,946.157,188315  
Ruby MRI9,862.172,732292  
 partial-sums 
PHP17.815,504367  
Ruby MRI59.611,640362  
 reverse-complement 
PHP2.5839,696508  
Ruby MRI8.0886,340266  
 nsieve 
PHP13.3110,516221  
Ruby MRI41.5130,408270  
 fasta 
PHP1,755.915,5761029  
Ruby MRI4,202.98238,156744  
 n-body 
PHP2,381.865,6361289  
Ruby MRI4,847.571,7121137  
 k-nucleotide 
PHP79.7830,336818  
Ruby MRI160.0984,616420  
 recursive 
PHP25.446,316315  
Ruby MRI45.764,492301  
 fannkuch 
PHP7.625,500484  
Ruby MRI12.422,864326  
 pidigits 
PHP0.201,820537  
Ruby MRI0.306,032653  
 binary-trees 
PHP173.2581,648493  
Ruby MRI172.3148,756409  
 regex-dna 
PHP9.20106,752675  
Ruby MRI7.6242,824396  
 chameneos-redux
   No programs

 Step 4 : Are there other PHP programs for these benchmarks?

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.

 Step 5 : Are there other faster programs for these benchmarks?

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 : scripts embedded in html and much more 

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

Revised BSD license

  Home   Flawed   Fastest   License   Help