/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/4±
 fasta1/4 ±
 spectral-norm1/2 
 mandelbrot1/2 ±
 fannkuch-redux± ±
 n-body± ±
 regex-dna±1/2
 pidigits± 
 reverse-complement±1/2±
 binary-trees †±±
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/41/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 
PHP45.7940.06246,9521036  4% 90% 14% 7% †
Python 3488.50161.33364,488647  89% 60% 98% 56% †
 fasta 
PHP68.8868.912,5961110  0% 90% 10% 1%
Python 3241.56246.324,324788  30% 24% 15% 33%
 spectral-norm 
PHP430.11108.8614,3721193  99% 99% 99% 99%
Python 31,026.66258.4230,260437  99% 99% 99% 99%
 mandelbrot 
PHP1,159.81290.9875,728863  100% 100% 100% 100%
Python 31,837.41483.667,488777  100% 94% 93% 94%
 fannkuch-redux 
PHP2,847.18744.7210,5641150  91% 93% 99% 100%
Python 34,000.061,012.0627,840797  99% 99% 98% 100%
 n-body 
PHP741.54741.842,5961082  0% 38% 62% 0%
Python 3984.27984.534,2521181  0% 100% 0% 0%
 regex-dna 
PHP26.749.65150,664832  60% 53% 95% 70%
Python 323.8111.01248,260478  37% 72% 45% 64%
 pidigits 
PHP2.782.793,412394  0% 0% 1% 100%
Python 33.053.065,332256  1% 1% 0% 100%
 reverse-complement 
PHP7.837.85443,496262  0% 100% 0% 0%
Python 36.536.55781,144325  0% 1% 0% 100%
 binary-trees 
PHP547.79548.40546,272472  72% 24% 5% 4% †
Python 3526.56139.26688,512626  93% 96% 96% 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 13:34:35)

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