OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
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 Java 6 -server program used compared to the fastest PHP program.
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 Java 6 -server program used compared to the fastest PHP program.
| Java 6 -server used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| n-body | 1/161 | 2× | ± | |
| spectral-norm | 1/123 | ± | 2× | |
| fasta | 1/82 | 2× | ± | |
| recursive | 1/53 | 2× | ± | |
| mandelbrot | 1/28 | 2× | 2× | |
| fannkuch | 1/27 | 2× | ± | |
| nsieve-bits | 1/25 | ± | 2× | |
| binary-trees | 1/25 | 1/3 | ± | |
| nsieve | 1/6 | 2× | ± | |
| k-nucleotide | 1/5 | 2× | ± | |
| partial-sums | 1/4 | 2× | 2× | |
| reverse-complement | 1/2 | ± | ± | |
| regex-dna | ± | ± | ± | |
| pidigits | ± | 5× | 2× | |
± 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 Java 6 -server program are shown for comparison against measurements of the fastest PHP program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| n-body | |||||
| Java 6 -server | 14.75 | 11,524 | 1424 | ||
| PHP | 2,381.86 | 5,636 | 1289 | ||
| spectral-norm | |||||
| Java 6 -server | 24.01 | 10,008 | 514 | ||
| PHP | 2,946.15 | 7,188 | 315 | ||
| fasta | |||||
| Java 6 -server | 21.46 | 9,184 | 1240 | ||
| PHP | 1,755.91 | 5,576 | 1029 | ||
| recursive | |||||
| Java 6 -server | 0.48 | 11,628 | 427 | ||
| PHP | 25.44 | 6,316 | 315 | ||
| mandelbrot | |||||
| Java 6 -server | 0.33 | 10,944 | 623 | ||
| PHP | 9.43 | 5,488 | 395 | ||
| fannkuch | |||||
| Java 6 -server | 0.28 | 8,872 | 555 | ||
| PHP | 7.62 | 5,500 | 484 | ||
| nsieve-bits | |||||
| Java 6 -server | 1.06 | 11,480 | 523 | ||
| PHP | 26.77 | 17,128 | 317 | ||
| binary-trees | |||||
| Java 6 -server | 6.89 | 26,808 | 603 | ||
| PHP | 173.25 | 81,648 | 493 | ||
| nsieve | |||||
| Java 6 -server | 2.25 | 20,592 | 296 | ||
| PHP | 13.31 | 10,516 | 221 | ||
| k-nucleotide | |||||
| Java 6 -server | 15.89 | 70,964 | 1052 | ||
| PHP | 79.78 | 30,336 | 818 | ||
| partial-sums | |||||
| Java 6 -server | 4.88 | 10,648 | 711 | ||
| PHP | 17.81 | 5,504 | 367 | ||
| reverse-complement | |||||
| Java 6 -server | 1.30 | 58,932 | 592 | ||
| PHP | 2.58 | 39,696 | 508 | ||
| regex-dna | |||||
| Java 6 -server | 7.81 | 75,892 | 921 | ||
| PHP | 9.20 | 106,752 | 675 | ||
| pidigits | |||||
| Java 6 -server | 0.23 | 8,720 | 938 | ||
| PHP | 0.20 | 1,820 | 537 | ||
| chameneos-redux | |||||
| Java 6 -server | 0.46 | 12,072 | 1429 | ||
Remember - those are just the fastest Java 6 -server and PHP programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Java 6 -server.
Maybe one of those other Java 6 -server programs is fastest on a different OS/machine.
Remember - those are just the fastest Java 6 -server and PHP 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.
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode, sharing)
Home Page: http://java.sun.com/j2se/
Download: http://java.sun.com/j2se/downloads/
"Remember how HotSpot works. It starts by running your program with an interpreter. When it discovers that some method is "hot" -- that is, executed a lot, either because it is called a lot or because it contains loops that loop a lot -- it sends that method off to be compiled. After that one of two things will happen, either the next time the method is called the compiled version will be invoked (instead of the interpreted version) or the currently long running loop will be replaced, while still running, with the compiled method. The latter is known as "on stack replacement" and exists in the 1.3/1.4 HotSpot based systems."