/mobile Handheld Friendly website

÷

 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.


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.

 PHP used what fraction? used how many times more? 
Benchmark Time Memory Code
 fasta1/41/2±
 spectral-norm1/3±±
 k-nucleotide1/21/2
 n-body±1/2±
 mandelbrot±16×±
 fannkuch-redux±1/2±
 pidigits±1/2
 reverse-complement±1/2±
 regex-dna±±±
 binary-trees±±±
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/41/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
 fasta 
PHP71.9671.992,5241110  0% 0% 0% 100%
Python 3259.48262.344,672788  0% 1% 1% 100%
 spectral-norm 
PHP397.57397.674,612397  0% 0% 0% 100%
Python 31,018.201,018.445,208328  0% 0% 0% 100%
 k-nucleotide 
PHP305.50306.06246,8041060  0% 0% 0% 100%
Python 3474.71474.95426,212647  1% 0% 0% 100%
 n-body 
PHP769.52769.752,5161082  0% 0% 0% 100%
Python 31,098.651,098.894,7001181  0% 0% 0% 100%
 mandelbrot 
PHP1,386.881,387.32108,044863  0% 0% 0% 100%
Python 31,845.311,968.406,748777  1% 0% 0% 100%
 fannkuch-redux 
PHP2,707.352,708.132,476441  0% 0% 0% 100%
Python 32,903.203,204.314,564385  0% 0% 0% 100%
 pidigits 
PHP2.792.803,536384  1% 0% 0% 100%
Python 33.063.065,408255  1% 0% 1% 100%
 reverse-complement 
PHP7.737.78369,020297  0% 1% 0% 100%
Python 36.506.51616,588325  0% 0% 0% 100%
 regex-dna 
PHP26.7626.78207,000459  0% 0% 0% 100%
Python 321.1321.14194,612424  0% 0% 0% 100%
 binary-trees 
PHP652.11652.85546,160504  0% 0% 0% 100%
Python 3504.56504.93685,724626  0% 0% 0% 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.4.11 (cli) (built: Jan 27 2013 11:58:31)

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