/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/121/3
 regex-dna1/31/2
 reverse-complement1/5
 k-nucleotide10×1/21/2
 spectral-norm26×±±
 n-body31×1/6±
 fasta33×1/6±
 mandelbrot48×±
 binary-trees92×1/2
 fannkuch-redux188×1/61/3
 PHP used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±28×48×115×188×

± 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,840537  1% 0% 100% 0%
Java 7 -server12.365.1647,3481826  60% 61% 61% 54%
 regex-dna 
PHP27.6727.69218,692459  0% 0% 0% 100%
Java 7 -server28.9210.07708,180929  65% 64% 83% 76%
 reverse-complement 
PHP4.594.61443,224343  0% 0% 0% 100%
Java 7 -server2.881.52294,6561661  56% 74% 46% 16%
 k-nucleotide 
PHP341.3593.19246,7761117  95% 84% 97% 91%
Java 7 -server34.659.39381,1762431  92% 89% 97% 92%
 spectral-norm 
PHP435.83110.9514,2121193  98% 98% 99% 97%
Java 7 -server16.384.2114,556950  97% 97% 99% 98%
 n-body 
PHP743.57743.752,5281082  77% 0% 0% 23%
Java 7 -server24.3724.3413,9321424  0% 0% 0% 100%
 fasta 
PHP159.75161.662,5321030  96% 1% 0% 4%
Java 7 -server4.954.8614,9761507  1% 0% 100% 1%
 mandelbrot 
PHP1,311.59329.93106,248863  100% 100% 100% 100%
Java 7 -server27.156.8967,832796  98% 99% 99% 99%
 binary-trees 
PHP895.38897.411,249,304483  7% 81% 10% 3%
Java 7 -server23.899.78532,9321007  61% 77% 45% 63%
 fannkuch-redux 
PHP3,224.823,225.632,516482  0% 0% 0% 100%
Java 7 -server67.7317.1314,2081282  98% 99% 99% 100%
 fasta-redux 
No program
Java 7 -server0.130.11?1443  9% 18% 10% 90%

 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