/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 Java 7 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 Java 7 program.

 PHP used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits1/31/131/5
 regex-dna±1/31/3
 reverse-complement±1/3
 k-nucleotide1/21/2
 fasta15×1/6±
 spectral-norm25×1/31/2
 n-body32×1/6±
 fannkuch-redux38×1/61/3
 binary-trees41×±±
 mandelbrot52×±
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/31/320×38×52×52×

± 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 Java 7 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
PHP2.792.803,536384  1% 0% 0% 100%
Java 77.337.3447,4401826  0% 0% 0% 100%
 regex-dna 
PHP26.7626.78207,000459  0% 0% 0% 100%
Java 722.6322.66557,0801284  0% 0% 0% 100%
 reverse-complement 
PHP7.737.78369,020297  0% 1% 0% 100%
Java 71.881.92511,484745  2% 1% 3% 100%
 k-nucleotide 
PHP305.50306.06246,8041060  0% 0% 0% 100%
Java 750.6950.73494,0401630  1% 0% 0% 100%
 fasta 
PHP71.9671.992,5241110  0% 0% 0% 100%
Java 74.924.9214,9321507  0% 1% 0% 100%
 spectral-norm 
PHP397.57397.674,612397  0% 0% 0% 100%
Java 716.1316.1414,924950  1% 0% 0% 100%
 n-body 
PHP769.52769.752,5161082  0% 0% 0% 100%
Java 724.4024.4113,9961424  0% 0% 0% 100%
 fannkuch-redux 
PHP2,707.352,708.132,476441  0% 0% 0% 100%
Java 771.2671.2813,9361282  0% 0% 0% 100%
 binary-trees 
PHP652.11652.85546,160504  0% 0% 0% 100%
Java 715.7015.75506,592603  0% 1% 0% 100%
 mandelbrot 
PHP1,386.881,387.32108,044863  0% 0% 0% 100%
Java 726.9226.9367,880796  0% 0% 0% 100%
 fasta-redux 
No program
Java 70.120.12?1443  0% 33% 0% 100%

 4 : Are there other PHP programs for these benchmarks?

Remember - those are just the fastest PHP and Java 7 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 Java 7 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