惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - 王庆

crosstool-ng搭建交叉编译环境注意事项 多重继承及虚继承中对象内存的分布 编写和调试Android下JNI程序流程 eclipse xml文件中按alt+/没有提示信息 Android NDK 工具链的使用方法(Standalone Toolchain) 编译Android VNC Server 使用gdb和gdbserver调试Android C/C++程序 openssl在多平台和多语言之间进行RSA加解密注意事项 LINUX开发使用的3个远程工具 NDK 链接第三方静态库的方法 动态生成程序集和类型 关于线程池的一段代码 理解ParseChildren用法 快速查找ASP.NET产生的临时文件 捕获ASP.NET程序发生的异常 Synchronized vs SyncRoot Exception vs ApplicationException Monitor用法 C#多线程之Thread
【转】Hashtable,ListDictionary,HybridDictionary比较
王庆 · 2008-07-13 · via 博客园 - 王庆

Hashtable,ListDictionary,HybridDictionary

1.所谓存储名值对的三个容器: key-value

2.性能上
小数据量: ListDictionary优于Hashtable
大数据量: Hashtable优于ListDictionary
要知道Hashtable并不是线性存储结构,但是对于利用Hash因子取值的Hashtable在处理大数据量的时候有优势.

3.那么什么是小,什么是大?
10个或10个以下为小,10个以上为大.
如果你知道你的容器将存储的数据量肯定不超过10的话,请你选用ListDictionary
否则,请你选用Hashtable.

4.为什么要用HybridDictionary?
因为你往往不知道什么情况下,他的数据量将是多少.
如果你知道,那么请看3.
如果你不知道,请使用HybridDictionary,因为它帮你智能化的决定你的数据该用ListDictionary存储还是Hashtable存储.
而不用你主动决定该用那个数据类型.


因此,大家可以多多使用HybridDictionary,而不用直接使用Hashtable,因为我们的Hashtable存储的值往往并没有 那么多.