Storage Performance and features of arraylist, vector, and sorted list

Source: Internet
Author: User

Both arraylisth and vector use arrays to store data. arraylist is thread-insecure and vector is thread-safe. Therefore, arraylist has better performance than vector, the consumer list uses a two-way linked list to store data, which is thread-unsafe. In addition, the consumer list provides some methods, so that the consumer list can be used as a stack and queue. Because arraylist and vector use arrays to store data, data query is fast, but data addition and deletion operations are relatively slow. However, sorted list uses the event linked list method, this means that the sorted list is not so fast in data query, but it is fast in adding and deleting data.

This article is from the "session" blog, please be sure to keep this source http://7720365.blog.51cto.com/7710365/1433498

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.