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 Perl 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 Perl 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-nucleotide1/41/8
 mandelbrot1/3 ±
 pidigits1/2 
 n-body1/2 ±
 fasta-redux± ±
 regex-dna±±
 fasta± ±
 fannkuch-redux 
 reverse-complement±±
 spectral-norm 
 binary-trees †1/2±
 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 Perl program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
PHP53.6519.10248,0441141  65% 66% 70% 82%
Perl240.6070.321,886,164648  84% 90% 82% 87%
 mandelbrot 
PHP1,288.37322.44115,808863  100% 100% 100% 100%
Perl3,308.66828.0041,196579  100% 100% 100% 100%
 pidigits 
PHP2.162.164,280394  1% 0% 0% 100%
Perl4.374.384,316261  1% 0% 0% 100%
 n-body 
PHP712.83713.053,3361082  100% 0% 0% 0%
Perl1,095.451,095.802,6481401  0% 0% 0% 100%
 fasta-redux 
PHP64.6564.683,5881110  11% 26% 3% 70%
Perl82.0582.082,656854  62% 1% 39% 1%
 regex-dna 
PHP26.249.60151,380832  52% 70% 57% 95%
Perl30.7511.21141,108527  49% 70% 76% 80%
 fasta 
PHP133.11136.583,3281030  60% 36% 4% 0%
Perl104.98105.03100,328838  0% 100% 0% 0%
 fannkuch-redux 
PHP3,372.33862.7814,9681150  99% 98% 99% 95%
Perl2,112.88531.888,720565  100% 99% 99% 99%
 reverse-complement 
PHP6.406.41444,376262  0% 0% 0% 100%
Perl2.902.90374,704284  0% 0% 0% 100%
 spectral-norm 
PHP446.61113.8524,4081193  98% 97% 100% 98%
Perl183.4747.039,340551  98% 97% 98% 97%
 binary-trees 
PHP634.80635.631,025,300472  0% 0% 0% 100% †
Perl755.68211.701,593,648706  78% 95% 96% 89% †

† 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 Perl 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 Perl 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