/mobile Handheld Friendly website

vs

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

Each chart bar shows, for one unidentified benchmark, how much the fastest PHP program used compared to the fastest Python 3 program.

(Memory use is only compared for tasks that require memory to be allocated.)


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.

 2 : Are the PHP programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest PHP program used compared to the fastest Python 3 program.

(Memory use is only compared for tasks that require memory to be allocated.)

 PHP used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide1/91/2
 fasta1/3 ±
 spectral-norm1/2 ±
 mandelbrot± 1/2
 n-body± ±
 pidigits± 
 reverse-complement±1/2±
 regex-dna±±±
 fannkuch-redux± ±
 binary-trees±±±
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/91/91/2±±±±

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

 3 : Are the PHP programs faster? Measurements.

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 PHP 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
 k-nucleotide 
PHP42.6242.66247,8321036  0% 0% 0% 100%
Python 3372.03374.89456,532647  0% 1% 1% 100%
 fasta 
PHP63.3663.383,6001110  0% 0% 0% 100%
Python 3156.10160.135,572792  1% 0% 0% 100%
 spectral-norm 
PHP431.80431.947,240397  0% 0% 0% 100%
Python 3746.94747.206,468328  1% 0% 0% 100%
 mandelbrot 
PHP1,240.231,240.584,248443  0% 1% 1% 100%
Python 31,671.631,672.33110,552777  0% 1% 1% 100%
 n-body 
PHP703.90704.123,3401082  0% 0% 0% 100%
Python 3932.49932.795,5721181  1% 0% 0% 100%
 pidigits 
PHP2.152.154,284394  0% 0% 0% 100%
Python 32.392.396,612256  2% 0% 1% 100%
 reverse-complement 
PHP6.416.42444,380262  0% 0% 0% 100%
Python 35.986.001,008,592325  0% 1% 1% 100%
 regex-dna 
PHP26.3426.35219,356459  0% 1% 0% 100%
Python 323.0823.19257,976478  0% 1% 1% 100%
 fannkuch-redux 
PHP2,958.792,959.763,264441  0% 0% 0% 100%
Python 32,333.002,333.785,416385  1% 0% 0% 100%
 binary-trees 
PHP640.28641.071,025,292472  0% 0% 0% 100%
Python 3479.82480.361,123,040626  0% 1% 1% 100%
 fasta-redux
   No programs

 4 : Are there other PHP programs for these benchmarks?

Remember - those are just the fastest PHP and Python 3 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.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest PHP 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.

 PHP : scripts embedded in html and much more 

PHP 5.5.0 (cli) (built: Jun 25 2013 23:17:03)

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   Conclusions   License   Play