/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-nucleotide †1/31/2
 fasta1/3 ±
 spectral-norm1/2 
 mandelbrot± ±
 n-body± ±
 pidigits± 
 regex-dna±1/2
 fannkuch-redux± ±
 reverse-complement±1/2±
 binary-trees †±±
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/31/31/2±±

† possible mismatch - one-core program compared to multi-core program.

± 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 
PHP43.0837.93247,8321036  4% 91% 4% 16% †
Python 3374.51124.40498,756647  59% 58% 87% 98% †
 fasta 
PHP62.5862.613,5921110  89% 0% 0% 11%
Python 3161.75166.415,576788  25% 27% 16% 34%
 spectral-norm 
PHP446.61113.8524,4081193  98% 97% 100% 98%
Python 3821.48209.7643,728437  98% 98% 98% 98%
 mandelbrot 
PHP1,288.37322.44115,808863  100% 100% 100% 100%
Python 31,760.17475.3710,556777  90% 100% 90% 90%
 n-body 
PHP712.83713.053,3361082  100% 0% 0% 0%
Python 3939.20939.505,5641181  1% 0% 0% 100%
 pidigits 
PHP2.162.164,280394  1% 0% 0% 100%
Python 32.402.416,600256  1% 2% 0% 100%
 regex-dna 
PHP26.249.60151,380832  52% 70% 57% 95%
Python 322.9810.42269,120478  40% 48% 83% 55%
 fannkuch-redux 
PHP3,372.33862.7814,9681150  99% 98% 99% 95%
Python 33,587.04915.3640,096797  98% 97% 100% 97%
 reverse-complement 
PHP6.406.41444,376262  0% 0% 0% 100%
Python 35.925.941,008,592325  1% 1% 1% 100%
 binary-trees 
PHP634.80635.631,025,300472  0% 0% 0% 100% †
Python 3531.55140.741,123,020626  98% 94% 94% 94% †
 fasta-redux
   No programs

† possible mismatch - one-core program compared to multi-core program.

 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