org.knowceans.sandbox
Class VectorSpeed

java.lang.Object
  extended by org.knowceans.sandbox.VectorSpeed

public class VectorSpeed
extends java.lang.Object

VectorSpeed

Author:
heinrich

Nested Class Summary
(package private)  class VectorSpeed.Entry
           
 
Field Summary
static int interval
           
static boolean progress
           
static int SIZE
           
 
Constructor Summary
VectorSpeed()
           
 
Method Summary
private static void compareArrayAndVectorOps()
          show that vector sorting takes 8 times as long for primitive types than array sorting ....................................................................................................
 int[] fillArray()
           
 VectorSpeed.Entry[] fillObjArray()
           
 java.util.Vector<VectorSpeed.Entry> fillObjVector()
           
 java.util.Vector<java.lang.Integer> fillVector()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static int SIZE

progress

public static boolean progress

interval

public static int interval
Constructor Detail

VectorSpeed

public VectorSpeed()
Method Detail

main

public static void main(java.lang.String[] args)

compareArrayAndVectorOps

private static void compareArrayAndVectorOps()
show that vector sorting takes 8 times as long for primitive types than array sorting .................................................................................................... Fill array: dur =1932 Sort array: dur =8032 .................................................................................................... Fill vector: dur =14391 Sort vector: dur =62930


fillArray

public int[] fillArray()

fillVector

public java.util.Vector<java.lang.Integer> fillVector()

fillObjArray

public VectorSpeed.Entry[] fillObjArray()

fillObjVector

public java.util.Vector<VectorSpeed.Entry> fillObjVector()