/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® quad-core |
This table shows 4 measurements - CPU Time, Elapsed Time, Memory and Code.
Each row shows those measurements for a particular Java 7 program with a particular command-line input value N.
This table shows the current Java 7 programs.
| Program Source Code | N | CPU secs | Elapsed secs | Memory KB | Code B |
|---|---|---|---|---|---|
| binary-trees #2 | 12 | 0.15 | 0.12 | ? | 603 |
| binary-trees #2 | 16 | 0.94 | 0.82 | 148,920 | 603 |
| binary-trees #2 | 20 | 16.90 | 12.75 | 485,056 | 603 |
| binary-trees | 12 | 0.20 | 0.47 | 3,664 | 1007 |
| binary-trees | 16 | 0.95 | 0.55 | 78,180 | 1007 |
| binary-trees | 20 | 21.35 | 9.21 | 525,420 | 1007 |
| binary-trees-redux #2 | 12 | 0.16 | 0.13 | ? | 607 |
| binary-trees-redux #2 | 16 | 0.87 | 0.71 | 53,560 | 607 |
| binary-trees-redux #2 | 20 | 234.19 | 69.69 | 134,176 | 607 |
| chameneos-redux #2 | 60,000 | 0.45 | 0.20 | ? | 1429 |
| chameneos-redux #2 | 600,000 | 4.18 | 1.40 | 29,324 | 1429 |
| chameneos-redux #2 | 6,000,000 | 37.64 | 12.59 | 30,756 | 1429 |
| chameneos-redux #3 | 60,000 | 0.72 | 0.28 | 212 | 1267 |
| chameneos-redux #3 | 600,000 | 3.42 | 1.05 | 33,084 | 1267 |
| chameneos-redux #3 | 6,000,000 | 29.11 | 8.55 | 48,252 | 1267 |
| chameneos-redux | 60,000 | 0.31 | 0.16 | ? | 1770 |
| chameneos-redux | 600,000 | 1.38 | 0.89 | 17,528 | 1770 |
| chameneos-redux | 6,000,000 | 6.57 | 5.19 | 29,584 | 1770 |
| fannkuch-redux | 10 | 0.72 | 0.24 | 212 | 1282 |
| fannkuch-redux | 11 | 5.22 | 1.38 | 13,924 | 1282 |
| fannkuch-redux | 12 | 67.91 | 17.17 | 14,460 | 1282 |
| fannkuch-redux #2 | 10 | 0.81 | 0.76 | 14,700 | 514 |
| fannkuch-redux #2 | 11 | 5.73 | 5.69 | 14,672 | 514 |
| fannkuch-redux #2 | 12 | 87.01 | 86.98 | 14,712 | 514 |
| fasta #2 | 250,000 | 0.23 | 0.18 | ? | 1240 |
| fasta #2 | 2,500,000 | 1.05 | 0.97 | 15,300 | 1240 |
| fasta #2 | 25,000,000 | 7.81 | 7.72 | 15,240 | 1240 |
| fasta #4 | 250,000 | 0.19 | 0.15 | ? | 1507 |
| fasta #4 | 2,500,000 | 0.69 | 0.62 | 14,428 | 1507 |
| fasta #4 | 25,000,000 | 5.07 | 4.99 | 14,976 | 1507 |
| fasta-redux #3 | 250,000 | 0.13 | 0.11 | ? | 1443 |
| fasta-redux #3 | 2,500,000 | 0.36 | 0.31 | 212 | 1443 |
| fasta-redux #3 | 25,000,000 | 1.90 | 1.85 | 14,500 | 1443 |
| k-nucleotide #2 | 250,000 | 1.48 | 0.48 | 28,148 | 1602 |
| k-nucleotide #2 | 2,500,000 | 5.64 | 1.68 | 80,800 | 1602 |
| k-nucleotide #2 | 25,000,000 | 44.83 | 12.93 | 494,264 | 1602 |
| k-nucleotide #3 | 250,000 | 1.31 | 0.48 | 28,144 | 1630 |
| k-nucleotide #3 | 2,500,000 | 6.31 | 2.08 | 132,884 | 1630 |
| k-nucleotide #3 | 25,000,000 | 46.77 | 13.37 | 494,772 | 1630 |
| mandelbrot | 1,000 | 0.34 | 0.30 | 212 | 665 |
| mandelbrot | 4,000 | 2.87 | 2.83 | 14,252 | 665 |
| mandelbrot | 16,000 | 42.94 | 42.90 | 14,240 | 665 |
| mandelbrot #2 | 1,000 | 0.26 | 0.12 | ? | 796 |
| mandelbrot #2 | 4,000 | 1.88 | 0.54 | 15,804 | 796 |
| mandelbrot #2 | 16,000 | 27.14 | 6.90 | 67,612 | 796 |
| mandelbrot #6 | 1,000 | 0.30 | 0.13 | ? | 802 |
| mandelbrot #6 | 4,000 | 2.04 | 0.58 | 15,804 | 802 |
| mandelbrot #6 | 16,000 | 29.56 | 7.55 | 67,600 | 802 |
| mandelbrot #3 | 1,000 | 0.44 | 0.20 | ? | 903 |
| mandelbrot #3 | 4,000 | 3.31 | 0.96 | 16,304 | 903 |
| mandelbrot #3 | 16,000 | 42.29 | 10.72 | 68,128 | 903 |
| meteor-contest | 2,098 | 0.90 | 0.81 | 16,232 | 4368 |
| meteor-contest #2 | 2,098 | 0.42 | 0.22 | 240 | 5177 |
| n-body #2 | 500,000 | 0.36 | 0.33 | 212 | 1424 |
| n-body #2 | 5,000,000 | 2.54 | 2.52 | 13,916 | 1424 |
| n-body #2 | 50,000,000 | 24.41 | 24.39 | 13,976 | 1424 |
| pidigits | 2,000 | 1.79 | 1.16 | 153,492 | 800 |
| pidigits | 6,000 | 10.33 | 9.41 | 233,988 | 800 |
| pidigits | 10,000 | 28.56 | 27.50 | 358,248 | 800 |
| pidigits #2 | 2,000 | Failed | 938 | ||
| pidigits #3 | 2,000 | 1.82 | 0.66 | 32,684 | 1826 |
| pidigits #3 | 6,000 | 5.72 | 2.36 | 34,072 | 1826 |
| pidigits #3 | 10,000 | 11.75 | 5.12 | 46,488 | 1826 |
| pidigits #4 | 2,000 | 1.77 | 1.00 | 26,356 | 1808 |
| pidigits #4 | 6,000 | 4.55 | 2.33 | 32,284 | 1808 |
| pidigits #4 | 10,000 | 11.76 | 5.15 | 44,092 | 1808 |
| regex-dna #5 | 50,000 | 0.91 | 0.36 | 212 | 929 |
| regex-dna #5 | 500,000 | 3.48 | 1.21 | 84,608 | 929 |
| regex-dna #5 | 5,000,000 | 27.09 | 9.43 | 708,060 | 929 |
| regex-dna #7 | 50,000 | 0.63 | 0.41 | 240 | 1284 |
| regex-dna #7 | 500,000 | 2.73 | 2.44 | 25,672 | 1284 |
| regex-dna #7 | 5,000,000 | 22.16 | 21.90 | 556,704 | 1284 |
| regex-dna #6 | 50,000 | Failed | 1410 | ||
| regex-dna #2 | 50,000 | 0.92 | 0.38 | 216 | 1534 |
| regex-dna #2 | 500,000 | 4.84 | 1.67 | 97,928 | 1534 |
| regex-dna #2 | 5,000,000 | 41.89 | 13.60 | 730,784 | 1534 |
| regex-dna #4 | 50,000 | 0.78 | 0.49 | 28,540 | 921 |
| regex-dna #4 | 500,000 | 3.26 | 2.67 | 60,992 | 921 |
| regex-dna #4 | 5,000,000 | 26.33 | 24.67 | 720,412 | 921 |
| reverse-complement #4 | 250,000 | 0.23 | 0.15 | ? | 592 |
| reverse-complement #4 | 2,500,000 | 0.53 | 0.44 | 36,472 | 592 |
| reverse-complement #4 | 25,000,000 | 3.07 | 2.99 | 476,240 | 592 |
| reverse-complement #3 | 250,000 | 0.30 | 0.20 | ? | 1661 |
| reverse-complement #3 | 2,500,000 | 0.56 | 0.33 | 216 | 1661 |
| reverse-complement #3 | 25,000,000 | 2.93 | 1.52 | 294,784 | 1661 |
| reverse-complement #7 | 250,000 | 0.42 | 0.30 | 212 | 1640 |
| reverse-complement #7 | 2,500,000 | 0.71 | 0.85 | 40,048 | 1640 |
| reverse-complement #7 | 25,000,000 | 2.39 | 8.78 | 263,532 | 1640 |
| reverse-complement #6 | 250,000 | 0.16 | 0.12 | ? | 745 |
| reverse-complement #6 | 2,500,000 | 0.37 | 0.31 | 212 | 745 |
| reverse-complement #6 | 25,000,000 | 1.92 | 1.68 | 511,484 | 745 |
| spectral-norm #2 | 500 | 0.48 | 0.20 | ? | 950 |
| spectral-norm #2 | 3,000 | 5.23 | 1.41 | 14,188 | 950 |
| spectral-norm #2 | 5,500 | 16.39 | 4.21 | 14,740 | 950 |
| spectral-norm | 500 | 0.30 | 0.25 | 240 | 514 |
| spectral-norm | 3,000 | 5.16 | 5.10 | 14,704 | 514 |
| spectral-norm | 5,500 | 16.90 | 16.85 | 15,236 | 514 |
| thread-ring #3 | 500,000 | 4.82 | 4.33 | 26,420 | 530 |
| thread-ring #3 | 5,000,000 | 41.82 | 38.25 | 26,640 | 530 |
| thread-ring #3 | 50,000,000 | 405.33 | 373.96 | 288,644 | 530 |
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Server VM (build 23.6-b04, mixed mode)
Home Page: Java SE at a Glance
Download: Java SE Downloads
Let's see how much, or how little, the time taken to invoke the JVM might contribute to the usual Java program times shown in the benchmarks game. Here are some additional (Intel® Q6600® quad-core) elapsed time measurements, taken after the Java programs started and before they exited.
In the first case (Cold), we simply started and measured the program 66 times; and then discarded the first measurement leaving 65 data points.
public static void main(String[] args){
for (int i=0; i<1; ++i){
System.gc();
long t1 = System.nanoTime();
nbody.program_main(args);
long t2 = System.nanoTime();
System.err.println( String.format( "%.6f", (t2 - t1) * 1e-9 ) );
}
}
In the second case (Warmed), we started the program once and repeated measurements again and again and again 66 times without restarting the JVM; and then discarded the first measurement leaving 65 data points.
public static void main(String[] args){
for (int i=0; i<66; ++i){
System.gc();
long t1 = System.nanoTime();
nbody.program_main(args);
long t2 = System.nanoTime();
System.err.println( String.format( "%.6f", (t2 - t1) * 1e-9 ) );
}
}
Compare these additional measurements against the usual Java program measurements shown in the benchmarks game --
| "1.7.0_06" Java HotSpot(TM) 64-Bit Server VM | ||||||
|---|---|---|---|---|---|---|
| System.nanoTime() | 1) Cold | 2) Warmed | ||||
| mean | σ | mean | σ | usual | ||
| meteor contest | 0.0118s | 0.0007 | 0.0016s | 0.0002 | 0.22s | |
| fasta-redux | 2.45s | 0.00 | 2.32s | 0.00 | 2.51s | |
| spectral-norm | 4.44s | 0.02 | 4.20s | 0.16 | 4.51s | |
| pidigits | 4.69s | 0.09 | 4.44s | 0.05 | 4.61s | |
| fasta | 5.07s | 0.46 | 4.84s | 0.02 | 5.13s | |
| chameneos-redux | 5.84s | 0.46 | 5.70s | 0.48 | 5.65s | |
| mandelbrot | 7.93s | 0.23 | 7.99s | 0.01 | 7.02s | |
| k-nucleotide | 8.09s | 0.28 | -- | -- | 8.05s | |
| regex-dna | 8.65s | 0.27 | -- | -- | 8.61s | |
| binary-trees | 10.54s | 0.28 | 7.66s | 0.16 | 9.08s | |
| fannkuch-redux | 16.89s | 1.32 | 17.26s | 0.10 | 17.38s | |
| nbody | 22.43s | 0.00 | 22.41s | 0.00 | 22.50s | |
| binary-trees-redux | 34.15s | 0.39 | 33.93s | 0.31 | 33.38s | |
The largest and most obvious effects of bytecode loading and dynamic optimization can be seen with the meteor-contest program which only runs for a fraction of a second.