/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.140.14?603
binary-trees  #2  160.960.98148,204603
binary-trees  #2  2016.3716.42499,404603
binary-trees   120.130.13?1007
binary-trees   160.800.82142,9241007
binary-trees   2020.0620.11545,5441007
binary-trees-redux  #2  120.130.14?607
binary-trees-redux  #2  160.890.9061,512607
binary-trees-redux  #2  20101.10101.17155,008607
chameneos-redux  #2  60,0000.260.274161429
chameneos-redux  #2  600,0001.361.3732,7481429
chameneos-redux  #2  6,000,00011.9711.9834,1681429
chameneos-redux  #3  60,0000.970.9825,6641267
chameneos-redux  #3  600,0006.926.9335,8001267
chameneos-redux  #3  6,000,00065.1365.1635,5041267
chameneos-redux   60,0000.260.274161770
chameneos-redux   600,0000.690.7022,9161770
chameneos-redux   6,000,0003.343.3523,0961770
fannkuch-redux  #2  100.510.5117,468514
fannkuch-redux  #2  116.156.1617,536514
fannkuch-redux  #2  1276.6276.6417,560514
fannkuch-redux   100.520.5217,1001282
fannkuch-redux   115.265.2717,1001282
fannkuch-redux   1270.1870.2017,1681282
fasta  #4  250,0000.160.17?1507
fasta  #4  2,500,0000.670.6717,5441507
fasta  #4  25,000,0005.185.1918,1321507
fasta  #2  250,0000.210.224201240
fasta  #2  2,500,0001.021.0318,9641240
fasta  #2  25,000,0008.138.1417,6961240
fasta-redux  #3  250,0000.120.12?1443
fasta-redux  #3  2,500,0000.390.396721443
fasta-redux  #3  25,000,0002.552.5617,2641443
k-nucleotide  #2  250,0001.041.0448,8201602
k-nucleotide  #2  2,500,0005.805.9797,6241602
k-nucleotide  #2  25,000,00050.5050.55451,2081602
k-nucleotide  #3  250,0001.001.0140,0241630
k-nucleotide  #3  2,500,0006.346.35145,4241630
k-nucleotide  #3  25,000,00050.8250.88448,2001630
mandelbrot  #3  1,0000.320.33416903
mandelbrot  #3  4,0002.822.8319,404903
mandelbrot  #3  16,00041.8641.8869,880903
mandelbrot   1,0000.310.31416665
mandelbrot   4,0002.882.8817,280665
mandelbrot   16,00043.2643.2717,280665
mandelbrot  #6  1,0000.200.22676802
mandelbrot  #6  4,0001.841.8519,236802
mandelbrot  #6  16,00027.5427.5569,684802
mandelbrot  #2  1,0000.190.20?796
mandelbrot  #2  4,0001.611.6218,896796
mandelbrot  #2  16,00023.7923.8069,816796
meteor-contest  #2  2,0980.390.3923,5485177
meteor-contest   2,0980.850.8620,2044368
n-body  #2  500,0000.320.326721424
n-body  #2  5,000,0002.342.3417,0161424
n-body  #2  50,000,00022.5122.5217,0161424
pidigits  #3  2,0001.281.2941,4801826
pidigits  #3  6,0003.153.1645,4721826
pidigits  #3  10,0005.905.9163,3441826
pidigits   2,0001.301.31159,000800
pidigits   6,0006.706.73356,612800
pidigits   10,00018.9719.02370,260800
pidigits  #2  2,000Failed  938
pidigits  #4  2,0001.281.3039,6761808
pidigits  #4  6,0003.223.2247,4801808
pidigits  #4  10,0005.985.9952,0961808
regex-dna  #6  50,0000.790.8043,5241410
regex-dna  #6  500,0002.822.8280,6241410
regex-dna  #6  5,000,000Failed  1410
regex-dna  #2  50,0000.770.7926,6281534
regex-dna  #2  500,0003.823.83102,6961534
regex-dna  #2  5,000,00032.7932.84746,2481534
regex-dna  #4  50,0000.710.7232,196921
regex-dna  #4  500,0003.203.2086,496921
regex-dna  #4  5,000,00023.4423.49822,060921
regex-dna  #7  50,0000.530.5620,0521284
regex-dna  #7  500,0002.662.7529,3241284
regex-dna  #7  5,000,00023.1123.17561,7321284
regex-dna  #5  50,0000.880.8928,380929
regex-dna  #5  500,0003.383.3996,860929
regex-dna  #5  5,000,00024.0824.14766,760929
reverse-complement  #7  250,0000.320.4621,0361640
reverse-complement  #7  2,500,0000.441.0843,5921640
reverse-complement  #7  25,000,0001.848.88266,4881640
reverse-complement  #6  250,0000.140.14?745
reverse-complement  #6  2,500,0000.310.32784745
reverse-complement  #6  25,000,0001.791.83514,504745
reverse-complement  #4  250,0000.160.16?592
reverse-complement  #4  2,500,0000.400.40788592
reverse-complement  #4  25,000,0002.492.52473,352592
reverse-complement  #3  250,0000.200.224201661
reverse-complement  #3  2,500,0000.430.4450,4121661
reverse-complement  #3  25,000,0002.642.66298,0401661
spectral-norm   5000.260.27416514
spectral-norm   3,0005.145.1517,804514
spectral-norm   5,50017.0017.0018,320514
spectral-norm  #2  5000.280.28416950
spectral-norm  #2  3,0005.305.3117,560950
spectral-norm  #2  5,50017.5317.5417,560950
thread-ring  #3  500,0002.652.6730,540530
thread-ring  #3  5,000,00023.0723.1038,588530
thread-ring  #3  50,000,000221.09221.26290,804530

 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) 64-Bit 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