/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/21/2
 k-nucleotide±1/2
 mandelbrot±1/2±
 n-body±1/2±
 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/31/3±±±

† 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 
PHP63.9864.003,2601110  0% 0% 100% 0%
Python 3219.23222.966,208788  31% 26% 3% 41%
 spectral-norm 
PHP415.31105.7323,9121193  99% 99% 98% 98%
Python 3804.62202.5439,668437  99% 99% 100% 99%
 k-nucleotide 
PHP330.6592.65247,6401060  88% 81% 93% 96%
Python 3384.41129.56451,488647  60% 98% 58% 81%
 mandelbrot 
PHP1,408.05352.36114,632863  100% 100% 100% 100%
Python 31,779.60446.24180,408777  100% 100% 100% 100%
 n-body 
PHP761.92762.133,2681082  0% 0% 100% 0%
Python 3934.69935.016,2921181  8% 74% 18% 0%
 fannkuch-redux 
PHP2,934.10735.7514,6881150  100% 100% 100% 100%
Python 33,556.66900.6036,288797  99% 100% 97% 99%
 pidigits 
PHP2.182.184,196384  1% 0% 0% 100%
Python 32.402.406,972255  0% 0% 100% 1%
 reverse-complement 
PHP6.626.65369,740297  0% 0% 0% 100%
Python 35.375.38679,776325  0% 0% 100% 0%
 regex-dna 
PHP35.8035.82222,432459  0% 0% 0% 100% †
Python 326.3412.88255,724478  41% 33% 99% 32% †
 binary-trees 
PHP697.38698.911,021,804504  8% 6% 1% 87% †
Python 3539.48142.511,209,460626  93% 95% 98% 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:28:24)

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