/mobile Handheld Friendly website

÷

 Step 1 : Are the PHP programs faster? At a glance.

This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each chart bar shows, for one unidentified benchmark, how much the fastest PHP program used compared to the fastest Java 7 -server program.


Look at speed another way - look at a box plot of Time-used data.

 Step 2 : Are the PHP programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each table row shows, for one named benchmark, how much the fastest PHP program used compared to the fastest Java 7 -server program.

 PHP used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits±1/41/2
 regex-dna±1/31/3
 reverse-complement±1/2
 k-nucleotide10×±1/3
 spectral-norm27×1/31/2
 n-body30×1/5±
 fasta31×1/6±
 mandelbrot44×1/251/2
 fannkuch-redux45×1/61/3
 binary-trees58×±
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±28×44×58×58×

± read the measurements and then read the program source code.

 Step 3 : Are the PHP programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.

For each named benchmark, measurements of the fastest PHP program are shown for comparison against measurements of the fastest Java 7 -server program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
PHP4.564.573,836537  1% 1% 0% 100%
Java 7 -server5.445.4416,944938  0% 0% 0% 100%
 regex-dna 
PHP27.5827.60212,000459  0% 0% 0% 100%
Java 7 -server21.5821.61557,6121284  0% 0% 0% 100%
 reverse-complement 
PHP4.554.58443,220343  0% 1% 1% 100%
Java 7 -server1.871.90511,340745  1% 1% 0% 100%
 k-nucleotide 
PHP340.87341.02246,780757  0% 0% 0% 100%
Java 7 -server33.8133.93336,3882431  0% 0% 0% 100%
 spectral-norm 
PHP435.29435.414,616397  0% 0% 0% 100%
Java 7 -server16.2116.2114,860950  0% 0% 0% 100%
 n-body 
PHP733.19733.392,5281082  0% 0% 0% 100%
Java 7 -server24.3224.3313,7441424  0% 0% 0% 100%
 fasta 
PHP151.21153.512,5281030  0% 0% 0% 100%
Java 7 -server4.924.9214,8281507  1% 0% 0% 100%
 mandelbrot 
PHP1,169.871,170.222,744443  0% 0% 0% 100%
Java 7 -server26.8626.8767,760796  0% 0% 0% 100%
 fannkuch-redux 
PHP3,225.573,226.382,512482  0% 0% 0% 100%
Java 7 -server71.2771.2913,8561282  0% 0% 0% 100%
 binary-trees 
PHP902.03903.991,253,300483  0% 0% 0% 100%
Java 7 -server15.6415.68506,672603  0% 0% 0% 100%
 fasta-redux 
No program
Java 7 -server0.110.11?1443  0% 0% 0% 100%

 Step 4 : Are there other PHP programs for these benchmarks?

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

 Step 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest PHP and Java 7 -server 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.0 (cli) (built: Mar 2 2012 10:00: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   Help