edu.umd.cloud9.io
Class BenchmarkCollectionAccess

java.lang.Object
  extended by edu.umd.cloud9.io.BenchmarkCollectionAccess

public class BenchmarkCollectionAccess
extends Object

Benchmark comparing HashMaps, ArrayLists, and raw arrays. Tests one trillion accesses to a simple three element collection. Sample output:

 1000000000 accesses to a 3-element collection:
  for HashMap: 17.609 seconds
  for ArrayList: 12.313 seconds
  for array: 1.219 seconds
 


Method Summary
static void main(String[] args)
          Runs this benchmark.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
Runs this benchmark.