/mobile Handheld Friendly website

 Java 7 measurements

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  120.150.12?603
binary-trees  #2  160.940.82148,920603
binary-trees  #2  2016.9012.75485,056603
binary-trees   120.200.473,6641007
binary-trees   160.950.5578,1801007
binary-trees   2021.359.21525,4201007
binary-trees-redux  #2  120.160.13?607
binary-trees-redux  #2  160.870.7153,560607
binary-trees-redux  #2  20234.1969.69134,176607
chameneos-redux  #2  60,0000.450.20?1429
chameneos-redux  #2  600,0004.181.4029,3241429
chameneos-redux  #2  6,000,00037.6412.5930,7561429
chameneos-redux  #3  60,0000.720.282121267
chameneos-redux  #3  600,0003.421.0533,0841267
chameneos-redux  #3  6,000,00029.118.5548,2521267
chameneos-redux   60,0000.310.16?1770
chameneos-redux   600,0001.380.8917,5281770
chameneos-redux   6,000,0006.575.1929,5841770
fannkuch-redux   100.720.242121282
fannkuch-redux   115.221.3813,9241282
fannkuch-redux   1267.9117.1714,4601282
fannkuch-redux  #2  100.810.7614,700514
fannkuch-redux  #2  115.735.6914,672514
fannkuch-redux  #2  1287.0186.9814,712514
fasta  #2  250,0000.230.18?1240
fasta  #2  2,500,0001.050.9715,3001240
fasta  #2  25,000,0007.817.7215,2401240
fasta  #4  250,0000.190.15?1507
fasta  #4  2,500,0000.690.6214,4281507
fasta  #4  25,000,0005.074.9914,9761507
fasta-redux  #3  250,0000.130.11?1443
fasta-redux  #3  2,500,0000.360.312121443
fasta-redux  #3  25,000,0001.901.8514,5001443
k-nucleotide  #2  250,0001.480.4828,1481602
k-nucleotide  #2  2,500,0005.641.6880,8001602
k-nucleotide  #2  25,000,00044.8312.93494,2641602
k-nucleotide  #3  250,0001.310.4828,1441630
k-nucleotide  #3  2,500,0006.312.08132,8841630
k-nucleotide  #3  25,000,00046.7713.37494,7721630
mandelbrot   1,0000.340.30212665
mandelbrot   4,0002.872.8314,252665
mandelbrot   16,00042.9442.9014,240665
mandelbrot  #2  1,0000.260.12?796
mandelbrot  #2  4,0001.880.5415,804796
mandelbrot  #2  16,00027.146.9067,612796
mandelbrot  #6  1,0000.300.13?802
mandelbrot  #6  4,0002.040.5815,804802
mandelbrot  #6  16,00029.567.5567,600802
mandelbrot  #3  1,0000.440.20?903
mandelbrot  #3  4,0003.310.9616,304903
mandelbrot  #3  16,00042.2910.7268,128903
meteor-contest   2,0980.900.8116,2324368
meteor-contest  #2  2,0980.420.222405177
n-body  #2  500,0000.360.332121424
n-body  #2  5,000,0002.542.5213,9161424
n-body  #2  50,000,00024.4124.3913,9761424
pidigits   2,0001.791.16153,492800
pidigits   6,00010.339.41233,988800
pidigits   10,00028.5627.50358,248800
pidigits  #2  2,000Failed  938
pidigits  #3  2,0001.820.6632,6841826
pidigits  #3  6,0005.722.3634,0721826
pidigits  #3  10,00011.755.1246,4881826
pidigits  #4  2,0001.771.0026,3561808
pidigits  #4  6,0004.552.3332,2841808
pidigits  #4  10,00011.765.1544,0921808
regex-dna  #5  50,0000.910.36212929
regex-dna  #5  500,0003.481.2184,608929
regex-dna  #5  5,000,00027.099.43708,060929
regex-dna  #7  50,0000.630.412401284
regex-dna  #7  500,0002.732.4425,6721284
regex-dna  #7  5,000,00022.1621.90556,7041284
regex-dna  #6  50,000Failed  1410
regex-dna  #2  50,0000.920.382161534
regex-dna  #2  500,0004.841.6797,9281534
regex-dna  #2  5,000,00041.8913.60730,7841534
regex-dna  #4  50,0000.780.4928,540921
regex-dna  #4  500,0003.262.6760,992921
regex-dna  #4  5,000,00026.3324.67720,412921
reverse-complement  #4  250,0000.230.15?592
reverse-complement  #4  2,500,0000.530.4436,472592
reverse-complement  #4  25,000,0003.072.99476,240592
reverse-complement  #3  250,0000.300.20?1661
reverse-complement  #3  2,500,0000.560.332161661
reverse-complement  #3  25,000,0002.931.52294,7841661
reverse-complement  #7  250,0000.420.302121640
reverse-complement  #7  2,500,0000.710.8540,0481640
reverse-complement  #7  25,000,0002.398.78263,5321640
reverse-complement  #6  250,0000.160.12?745
reverse-complement  #6  2,500,0000.370.31212745
reverse-complement  #6  25,000,0001.921.68511,484745
spectral-norm  #2  5000.480.20?950
spectral-norm  #2  3,0005.231.4114,188950
spectral-norm  #2  5,50016.394.2114,740950
spectral-norm   5000.300.25240514
spectral-norm   3,0005.165.1014,704514
spectral-norm   5,50016.9016.8515,236514
thread-ring  #3  500,0004.824.3326,420530
thread-ring  #3  5,000,00041.8238.2526,640530
thread-ring  #3  50,000,000405.33373.96288,644530

 Java 7 : ubiquitous jit server virtual machine 

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.

Revised BSD license

  Home   Conclusions   License   Play