当前位置:网站首页>6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
2022-08-03 06:10:00 【Shiyu】
All implement the list interface, providing corresponding methods for adding, getting, and deleting objects, etc.
One, low-level design implementation, security, performance
Vector: The low-level implementation is implemented with an array, which is thread-safe, but inefficient. It is suitable for use in multiple threads, often reads objects, and uses less insertion and deletion.
ArrayList: The low-level implementation is implemented using an array, which is thread-unsafe and efficient. It is suitable for use in a single thread, often reads objects, and uses less insertion and deletion.
LinkedList: The low-level is implemented by a doubly linked list, which is not thread-safe and is suitable for reading less, frequently inserting and deleting objects.
Second, initial value, expansion multiple and expansion factor
Vector: 10 size+size*0.5+1= size*1.5+1 1
ArrayList: 10 size+size*1= 2*size 0.75
LinkedList: No expansion required, linked list implementation, dynamic expansion.
边栏推荐
- Kotlin 中的泛型介绍
- 自监督论文阅读笔记FIAD net: a Fast SAR ship detection network based on feature integration attention and self
- php连接数据库脚本
- 自监督论文阅读笔记 Self-Supervised Deep Learning for Vehicle Detection in High-Resolution Satellite Imagery
- 神经网络之感知机
- window下VS2022封装动态库以及调用动态库
- 损失函数(第五周)
- pandoc -crossref插件实现markdwon文档转word后公式编号自定义
- Oracle 日历表详解(含节假日)
- 常见的电子元器件分类介绍-唯样商城
猜你喜欢
Qlik Sense 临时处理表数据详解(Resident)
自监督论文阅读笔记SELF-SUPERVISED SPECTRAL MATCHING NETWORK FOR HYPERSPECTRAL TARGET DETECTION
自监督论文阅读笔记 Self-supervised Learning in Remote Sensing: A Review
设备树解析源码分析<devicetree>-1.基础结构
全球一流医疗技术公司如何最大程度提高设计工作效率 | SOLIDWORKS 产品探索
电子元器件的分类有哪些?
自监督论文阅读笔记Index Your Position: A Novel Self-Supervised Learning Method for Remote Sensing Images Sema
window下VS2022封装动态库以及调用动态库
进程间通信IPC - 信号量
Kettle Spoon 安装配置详解
随机推荐
自我监督学习和BERT模型
2021-04-23
ZEMAX | 在 OpticStudio 中使用自由曲面进行设计
003_旭日X3派初探:利用无线串口通信控制舵机
观看华为AI技术领域课程--深度学习前三章总结
快速的将结构体各成员清零
Qlik Sense 赋值详解(Set、Let)
B.1#【编程语言】—1 arm 汇编指令
采用Trench肖特基二极管,实现功率密度的显著提升
梯度下降、反向传播
A.1#【内存管理】——1.1.3 page: struct page
进程间通讯 (IPC 技术) - 信号
卷积神经网络入门
时间盲注脚本
代码没写完,哪里有脸睡觉!17 张程序员壁纸推荐
ucos任务调度原理
自监督论文阅读笔记 DetCo: Unsupervised Contrastive Learning for Object Detection
Hook初探索
网络间通信
自监督论文阅读笔记SELF-SUPERVISED SPECTRAL MATCHING NETWORK FOR HYPERSPECTRAL TARGET DETECTION