Vector, ArrayList, LinkedList storage performance and characteristics?

  • ArrayList and Vector are using an array to store data
  • Indexed by serial number allows direct element
  • Insert element array involving expansion, and other elements of the mobile memory operation
  • Insert slow to find the case of the index element fast, the presence of expansion
  • Vector operation element using a synchronized method, the performance is worse than ArrayList
  • Vector belonging legacy container, the container used in the early JDK
  • LinkedList storage elements using a doubly linked list
  • Find LinkedList elements by serial number, forward or required to traverse, the press standard lookup element less efficient
  • LinkedList non-thread-safe
  • Compared continuous chain storage with storage arrays LinkedList used, higher memory utilization
  • LinkedList only need to move the pointer data is inserted, the insertion faster


 


 

All resources resources are summarized in the public No.


 

 

Guess you like

Origin www.cnblogs.com/ConstXiong/p/11921564.html