@Test
public void testPerformance() {

  String obj = "hello world";
  
  final int numElems = 1000000;
  final int numTrials = 5;
  
  for (int trial = 0; trial < numTrials; trial++) {
    System.gc();
    {
      ArrayList<String> arrayList = new ArrayList<String>();
      Stopwatch sw = new Stopwatch();
      sw.start();
      for (int i = 0; i < numElems; i++) {
        arrayList.add(obj);
      }
      System.out.println("       ArrayList " + sw.elapsedMillis());
    }
    
    // test ChunkedArrayList
    System.gc();
    {
      ChunkedArrayList<String> chunkedList = new ChunkedArrayList<String>();
      Stopwatch sw = new Stopwatch();
      sw.start();
      for (int i = 0; i < numElems; i++) {
        chunkedList.add(obj);
      }
      System.out.println("ChunkedArrayList " + sw.elapsedMillis());
    }
  }
}