/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/31/2±
 spectral-norm1/31/2
 k-nucleotide1/21/2
 fannkuch-redux±1/2±
 n-body±1/2±
 mandelbrot±16×±
 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/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
 fasta 
PHP72.9272.942,5281110  0% 0% 100% 0%
Python 3246.95249.754,600788  24% 2% 25% 51%
 spectral-norm 
PHP408.20103.8914,2321193  98% 98% 98% 99%
Python 31,062.11268.3227,732437  99% 99% 99% 99%
 k-nucleotide 
PHP292.6382.96246,8081060  90% 98% 83% 83%
Python 3489.02161.22422,160647  62% 55% 97% 90%
 fannkuch-redux 
PHP2,784.13699.8710,1921150  99% 100% 99% 100%
Python 34,138.161,045.6925,128797  99% 99% 98% 100%
 n-body 
PHP728.84729.082,5201082  77% 0% 23% 0%
Python 31,086.651,086.894,7161181  93% 0% 0% 7%
 mandelbrot 
PHP1,310.86328.02108,068863  100% 100% 100% 100%
Python 31,746.99438.656,772777  100% 100% 100% 100%
 pidigits 
PHP2.802.803,540384  0% 0% 1% 100%
Python 33.063.075,440255  1% 0% 0% 100%
 reverse-complement 
PHP7.747.75369,020297  0% 1% 100% 0%
Python 36.526.54601,488325  0% 0% 100% 0%
 regex-dna 
PHP26.7926.80217,568459  0% 1% 0% 100% †
Python 325.8912.98235,412478  40% 68% 40% 53% †
 binary-trees 
PHP642.64643.34549,880504  5% 4% 1% 93% †
Python 3524.47139.16685,880626  98% 93% 93% 93% †
 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.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