Package com.carrotsearch.hppc

Examples of com.carrotsearch.hppc.IntDeque


 
  void measureTime()
  {
    int i, j, len = 10, size = 1000000;
    IntArrayList list;
    IntDeque deque;
    long st, et;
   
    st = System.currentTimeMillis();
   
    for (i=0; i<size; i++)
    {
      list = new IntArrayList();
     
      for (j=0; j<len; j++)
        list.add(j);
     
      list.remove(list.size()-1);
    }
   
    et = System.currentTimeMillis();
    System.out.println(et-st);
   
    st = System.currentTimeMillis();
   
    for (i=0; i<size; i++)
    {
      deque = new IntArrayDeque();
     
      for (j=0; j<len; j++)
        deque.addLast(j);
     
      deque.removeLast();
    }
   
    et = System.currentTimeMillis();
    System.out.println(et-st);
  }
View Full Code Here


 
  void measureTime()
  {
    int i, j, len = 10, size = 1000000;
    IntArrayList list;
    IntDeque deque;
    long st, et;
   
    st = System.currentTimeMillis();
   
    for (i=0; i<size; i++)
    {
      list = new IntArrayList();
     
      for (j=0; j<len; j++)
        list.add(j);
     
      list.remove(list.size()-1);
    }
   
    et = System.currentTimeMillis();
    System.out.println(et-st);
   
    st = System.currentTimeMillis();
   
    for (i=0; i<size; i++)
    {
      deque = new IntArrayDeque();
     
      for (j=0; j<len; j++)
        deque.addLast(j);
     
      deque.removeLast();
    }
   
    et = System.currentTimeMillis();
    System.out.println(et-st);
  }
View Full Code Here

 
  void measureTime()
  {
    int i, j, len = 10, size = 1000000;
    IntArrayList list;
    IntDeque deque;
    long st, et;
   
    st = System.currentTimeMillis();
   
    for (i=0; i<size; i++)
    {
      list = new IntArrayList();
     
      for (j=0; j<len; j++)
        list.add(j);
     
      list.remove(list.size()-1);
    }
   
    et = System.currentTimeMillis();
    System.out.println(et-st);
   
    st = System.currentTimeMillis();
   
    for (i=0; i<size; i++)
    {
      deque = new IntArrayDeque();
     
      for (j=0; j<len; j++)
        deque.addLast(j);
     
      deque.removeLast();
    }
   
    et = System.currentTimeMillis();
    System.out.println(et-st);
  }
View Full Code Here

TOP

Related Classes of com.carrotsearch.hppc.IntDeque

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.