org.knowceans.sandbox
Class VectorSpeed
java.lang.Object
org.knowceans.sandbox.VectorSpeed
public class VectorSpeed
- extends java.lang.Object
VectorSpeed
- Author:
- heinrich
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIZE
public static int SIZE
progress
public static boolean progress
interval
public static int interval
VectorSpeed
public VectorSpeed()
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()