Class N07_Part2_Listing1
java.lang.Object
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 a href="http://www.ibm.com/developerworks/library/j-benchmark2/index.html#listing1">Listing 1.
- Author:
- Brent Boyer
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/3/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 |
N07_Part2_Listing1
public N07_Part2_Listing1()
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):
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