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

± 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.4163.433,2601110  0% 0% 0% 100%
Python 3217.54221.686,216792  0% 0% 1% 100%
 spectral-norm 
PHP399.36399.477,172397  0% 0% 0% 100%
Python 3787.37787.627,096328  0% 0% 0% 100%
 mandelbrot 
PHP1,355.281,355.684,180443  0% 0% 0% 100%
Python 31,729.801,730.60100,660777  0% 0% 0% 100%
 n-body 
PHP778.93779.153,2641082  0% 0% 0% 100%
Python 3916.32916.596,2961181  0% 0% 0% 100%
 k-nucleotide 
PHP341.49342.15247,6361060  0% 0% 0% 100%
Python 3388.14388.47487,132647  0% 0% 0% 100%
 pidigits 
PHP2.172.184,196384  0% 0% 0% 100%
Python 32.402.406,928255  2% 0% 0% 100%
 reverse-complement 
PHP6.576.60369,740297  0% 0% 0% 100%
Python 35.385.40675,272325  0% 0% 0% 100%
 fannkuch-redux 
PHP3,012.333,013.2214,7161150  0% 0% 0% 100%
Python 32,348.562,349.266,152385  0% 0% 0% 100%
 binary-trees 
PHP706.34707.971,028,668504  0% 0% 0% 100%
Python 3480.36480.871,209,444626  0% 0% 0% 100%
 regex-dna 
PHP35.8135.84223,132459  0% 0% 0% 100%
Python 321.7521.77200,012424  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: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