/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
 pidigits1/21/121/3
 regex-dna±1/21/3
 reverse-complement±1/2
 k-nucleotide12×1/21/3
 spectral-norm24×1/3±
 fasta29×1/6±
 binary-trees43×±±
 n-body43×1/5±
 fannkuch-redux46×1/51/3
 mandelbrot50×1/171/2
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/226×43×50×50×

± 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 
PHP3.583.594,672537  1% 0% 1% 100%
Java 7 -server6.006.0153,7681826  1% 0% 0% 100%
 regex-dna 
PHP26.7226.74226,108459  0% 0% 0% 100%
Java 7 -server22.9523.00561,4361284  0% 0% 0% 100%
 reverse-complement 
PHP4.234.25444,072343  0% 1% 0% 100%
Java 7 -server1.791.83514,512745  2% 1% 2% 100%
 k-nucleotide 
PHP347.06348.84247,632757  0% 0% 0% 100%
Java 7 -server29.0229.10521,8202431  0% 0% 0% 100%
 spectral-norm 
PHP407.85407.967,112397  0% 0% 0% 100%
Java 7 -server16.9917.0018,244514  0% 0% 0% 100%
 fasta 
PHP144.06149.913,2321030  0% 1% 1% 100%
Java 7 -server5.185.1918,0441507  1% 0% 1% 100%
 binary-trees 
PHP39.3939.43151,516483  0% 0% 0% 100%
Java 7 -server0.900.92148,116603  0% 2% 0% 100%
 n-body 
PHP971.81972.073,2441082  0% 0% 0% 100%
Java 7 -server22.5122.5116,9401424  0% 0% 0% 100%
 fannkuch-redux 
PHP3,199.123,199.903,212482  0% 0% 0% 100%
Java 7 -server69.9669.9917,0201282  0% 0% 0% 100%
 mandelbrot 
PHP1,191.951,192.304,172443  0% 0% 0% 100%
Java 7 -server23.7423.7569,696796  0% 0% 0% 100%
 fasta-redux 
No program
Java 7 -server0.120.12?1443  0% 8% 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 3 2012 00:19:40)

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