Class N01_Part1_Listing1

java.lang.Object
  extended by N01_Part1_Listing1
Direct Known Subclasses:
N02_Part1_Listing2

public class N01_Part1_Listing1
extends Object

For the article Robust Java benchmarking, Part 1: Issues, contains the code relevant to Listing 1.

Author:
Brent Boyer

Field Summary
protected static int global
          Global variable.
 
Constructor Summary
N01_Part1_Listing1()
           
 
Method Summary
protected static int calculate(int arg)
          Performs some simple calculations.
static void main(String[] args)
          Results on 2008/3/27 on my 2.2 GHz Intel Core 2 Duo E4500 machine (server jvm): a): Execution time: 34.539226 milliseconds b): Execution time: 52.472849 milliseconds c): Execution time: 35.368021999999996 milliseconds d): Execution time: 35.024231 milliseconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

global

protected static int global
Global variable.

Constructor Detail

N01_Part1_Listing1

public N01_Part1_Listing1()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Results on 2008/3/27 on my 2.2 GHz Intel Core 2 Duo E4500 machine (server jvm):

                a): Execution time: 34.539226 milliseconds
                b): Execution time: 52.472849 milliseconds
                c): Execution time: 35.368021999999996 milliseconds
                d): Execution time: 35.024231 milliseconds
        

Throws:
Exception

calculate

protected static int calculate(int arg)
Performs some simple calculations.