/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/141/3
 reverse-complement±1/5
 regex-dna1/31/3
 k-nucleotide13×1/21/2
 spectral-norm23×±±
 fasta28×1/6±
 n-body30×1/5±
 mandelbrot49×±
 binary-trees127×1/2
 fannkuch-redux241×1/51/3
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±25×49×117×241×

± 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.593.594,668537  0% 0% 1% 100%
Java 7 -server10.614.4363,1561826  71% 69% 52% 45%
 reverse-complement 
PHP4.194.23444,072343  0% 1% 100% 0%
Java 7 -server2.741.31298,2201661  45% 54% 37% 79%
 regex-dna 
PHP26.7126.73223,992459  0% 0% 100% 0%
Java 7 -server23.366.63636,9241410  92% 87% 88% 86%
 k-nucleotide 
PHP363.50104.52247,6241117  83% 80% 92% 95%
Java 7 -server29.238.03463,5162431  90% 98% 89% 89%
 spectral-norm 
PHP408.97104.5824,1121193  98% 98% 98% 98%
Java 7 -server17.624.5017,716950  98% 99% 98% 98%
 fasta 
PHP138.05141.973,2321030  25% 63% 14% 1%
Java 7 -server5.225.1418,1761507  0% 100% 1% 1%
 n-body 
PHP679.36679.513,2481082  0% 0% 100% 0%
Java 7 -server22.5222.5016,9201424  0% 100% 0% 0%
 mandelbrot 
PHP1,200.36300.72114,680863  100% 100% 100% 100%
Java 7 -server23.976.1069,360796  98% 99% 98% 98%
 binary-trees 
PHP1,190.781,195.052,381,092483  18% 15% 65% 4%
Java 7 -server22.869.41516,1441007  83% 41% 64% 57%
 fannkuch-redux 
PHP3,245.363,246.123,212482  31% 0% 0% 70%
Java 7 -server53.1913.4717,4161282  98% 100% 98% 100%
 fasta-redux 
No program
Java 7 -server0.130.11?1443  0% 92% 9% 11%

 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