/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
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.
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/2 | 1/12 | 1/3 | |
| regex-dna | ± | 1/2 | 1/3 | |
| reverse-complement | 2× | ± | 1/2 | |
| k-nucleotide | 12× | 1/2 | 1/3 | |
| spectral-norm | 24× | 1/3 | ± | |
| fasta | 29× | 1/6 | ± | |
| binary-trees | 43× | ± | ± | |
| n-body | 43× | 1/5 | ± | |
| fannkuch-redux | 46× | 1/5 | 1/3 | |
| mandelbrot | 50× | 1/17 | 1/2 | |
| PHP used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 1/2 | 1/2 | 2× | 26× | 43× | 50× | 50× |
± read the measurements and then read the program source code.
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 | |||||
| PHP | 3.58 | 3.59 | 4,672 | 537 | 1% 0% 1% 100% |
| Java 7 -server | 6.00 | 6.01 | 53,768 | 1826 | 1% 0% 0% 100% |
| regex-dna | |||||
| PHP | 26.72 | 26.74 | 226,108 | 459 | 0% 0% 0% 100% |
| Java 7 -server | 22.95 | 23.00 | 561,436 | 1284 | 0% 0% 0% 100% |
| reverse-complement | |||||
| PHP | 4.23 | 4.25 | 444,072 | 343 | 0% 1% 0% 100% |
| Java 7 -server | 1.79 | 1.83 | 514,512 | 745 | 2% 1% 2% 100% |
| k-nucleotide | |||||
| PHP | 347.06 | 348.84 | 247,632 | 757 | 0% 0% 0% 100% |
| Java 7 -server | 29.02 | 29.10 | 521,820 | 2431 | 0% 0% 0% 100% |
| spectral-norm | |||||
| PHP | 407.85 | 407.96 | 7,112 | 397 | 0% 0% 0% 100% |
| Java 7 -server | 16.99 | 17.00 | 18,244 | 514 | 0% 0% 0% 100% |
| fasta | |||||
| PHP | 144.06 | 149.91 | 3,232 | 1030 | 0% 1% 1% 100% |
| Java 7 -server | 5.18 | 5.19 | 18,044 | 1507 | 1% 0% 1% 100% |
| binary-trees | |||||
| PHP | 39.39 | 39.43 | 151,516 | 483 | 0% 0% 0% 100% |
| Java 7 -server | 0.90 | 0.92 | 148,116 | 603 | 0% 2% 0% 100% |
| n-body | |||||
| PHP | 971.81 | 972.07 | 3,244 | 1082 | 0% 0% 0% 100% |
| Java 7 -server | 22.51 | 22.51 | 16,940 | 1424 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| PHP | 3,199.12 | 3,199.90 | 3,212 | 482 | 0% 0% 0% 100% |
| Java 7 -server | 69.96 | 69.99 | 17,020 | 1282 | 0% 0% 0% 100% |
| mandelbrot | |||||
| PHP | 1,191.95 | 1,192.30 | 4,172 | 443 | 0% 0% 0% 100% |
| Java 7 -server | 23.74 | 23.75 | 69,696 | 796 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Java 7 -server | 0.12 | 0.12 | ? | 1443 | 0% 8% 0% 100% |
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.
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 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