/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one core |
Each chart bar shows, for one unidentified benchmark, how much the fastest PHP program used compared to the fastest Java 7 program.
These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.
Each table row shows, for one named benchmark, how much the fastest PHP program used compared to the fastest Java 7 program.
| PHP used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| pidigits | 1/3 | 1/13 | 1/5 | |
| regex-dna | ± | 1/3 | 1/3 | |
| reverse-complement | 4× | ± | 1/3 | |
| k-nucleotide | 6× | 1/2 | 1/2 | |
| fasta | 15× | 1/6 | ± | |
| spectral-norm | 25× | 1/3 | 1/2 | |
| n-body | 32× | 1/6 | ± | |
| fannkuch-redux | 38× | 1/6 | 1/3 | |
| binary-trees | 41× | ± | ± | |
| mandelbrot | 52× | 2× | ± | |
| PHP used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 1/3 | 1/3 | 4× | 20× | 38× | 52× | 52× |
± read the measurements and then read the program source code.
These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.
For each named benchmark, measurements of the fastest PHP program are shown for comparison against measurements of the fastest Java 7 program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| pidigits | |||||
| PHP | 2.79 | 2.80 | 3,536 | 384 | 1% 0% 0% 100% |
| Java 7 | 7.33 | 7.34 | 47,440 | 1826 | 0% 0% 0% 100% |
| regex-dna | |||||
| PHP | 26.76 | 26.78 | 207,000 | 459 | 0% 0% 0% 100% |
| Java 7 | 22.63 | 22.66 | 557,080 | 1284 | 0% 0% 0% 100% |
| reverse-complement | |||||
| PHP | 7.73 | 7.78 | 369,020 | 297 | 0% 1% 0% 100% |
| Java 7 | 1.88 | 1.92 | 511,484 | 745 | 2% 1% 3% 100% |
| k-nucleotide | |||||
| PHP | 305.50 | 306.06 | 246,804 | 1060 | 0% 0% 0% 100% |
| Java 7 | 50.69 | 50.73 | 494,040 | 1630 | 1% 0% 0% 100% |
| fasta | |||||
| PHP | 71.96 | 71.99 | 2,524 | 1110 | 0% 0% 0% 100% |
| Java 7 | 4.92 | 4.92 | 14,932 | 1507 | 0% 1% 0% 100% |
| spectral-norm | |||||
| PHP | 397.57 | 397.67 | 4,612 | 397 | 0% 0% 0% 100% |
| Java 7 | 16.13 | 16.14 | 14,924 | 950 | 1% 0% 0% 100% |
| n-body | |||||
| PHP | 769.52 | 769.75 | 2,516 | 1082 | 0% 0% 0% 100% |
| Java 7 | 24.40 | 24.41 | 13,996 | 1424 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| PHP | 2,707.35 | 2,708.13 | 2,476 | 441 | 0% 0% 0% 100% |
| Java 7 | 71.26 | 71.28 | 13,936 | 1282 | 0% 0% 0% 100% |
| binary-trees | |||||
| PHP | 652.11 | 652.85 | 546,160 | 504 | 0% 0% 0% 100% |
| Java 7 | 15.70 | 15.75 | 506,592 | 603 | 0% 1% 0% 100% |
| mandelbrot | |||||
| PHP | 1,386.88 | 1,387.32 | 108,044 | 863 | 0% 0% 0% 100% |
| Java 7 | 26.92 | 26.93 | 67,880 | 796 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Java 7 | 0.12 | 0.12 | ? | 1443 | 0% 33% 0% 100% |
Remember - those are just the fastest PHP and Java 7 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 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.11 (cli) (built: Jan 27 2013 11:58:31)
Overall Performance: PHP is rarely the bottleneck (HTML slides)
Home Page: http://www.php.net/
Download: http://www.php.net/downloads.php