Class N07_Part2_Listing1

java.lang.Object
  extended by N07_Part2_Listing1

public class N07_Part2_Listing1
extends Object

For the article Robust Java benchmarking, Part 2: Statistics And solutions, contains the code relevant to Listing 1.

Author:
Brent Boyer

Constructor Summary
N07_Part2_Listing1()
           
 
Method Summary
protected static int fibonacci(int n)
          Calculates and returns the nth Fibonacci number using a simple recursive algorithm.
static void main(String[] args)
          Results on 2008-03-27 on my 2.2 GHz Intel Core 2 Duo E4500 machine (server jvm): fibonacci(35): first = 106.857 ms, mean = 102.570 ms (CI deltas: -35.185 us, +47.076 us), sd = 645.586 us (CI deltas: -155.465 us, +355.098 us) WARNING: EXECUTION TIMES HAVE EXTREME OUTLIERS, SD VALUES MAY BE INACCURATE
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

N07_Part2_Listing1

public N07_Part2_Listing1()
Method Detail

main

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

                fibonacci(35): first = 106.857 ms, mean = 102.570 ms (CI deltas: -35.185 us, +47.076 us), sd = 645.586 us (CI deltas: -155.465 us, +355.098 us) WARNING: EXECUTION TIMES HAVE EXTREME OUTLIERS, SD VALUES MAY BE INACCURATE
        

Throws:
Exception

fibonacci

protected static int fibonacci(int n)
                        throws IllegalArgumentException
Calculates and returns the nth Fibonacci number using a simple recursive algorithm.

Throws:
IllegalArgumentException