C#中收集数据类型的比较 [英] Comparison of collection datatypes in C#
问题描述
添加
,删除
, RemoveLast 等支持,并给出相对的性能。
对于各种泛型类来说,这将是特别有趣的 - 如果它显示例如更好,如果 List< T>
之间的性能有所不同,其中 T
是一个类,其中 T
是一个结构体。
开始将是抽象数据结构的一个很好的作弊表,比较链接列表,哈希表等等谢谢!
解决方案正是您正在寻找的确存在。我忘了链接,试图找到它,我偶然遇到这个问题。无论如何,我发现链接,并认为我应该分享它:
http://xbox.create.msdn.com/downloads/?id=123&filename=DataStructures_CheatSheet.doc
Does anyone know of a good overview of the different C# collection types? I am looking for something showing which basic operations such as Add
, Remove
, RemoveLast
etc. are supported, and giving the relative performance.
It would be particularly interesting for the various generic classes - and even better if it showed eg. if there is a difference in performance between a List<T>
where T
is a class and one where T
is a struct.
A start would be a nice cheat-sheet for the abstract data structures, comparing Linked Lists, Hash Tables etc. etc. Thanks!
解决方案 Exactly what you were looking for does exists. I forgot the link and in attempting to find it I stumbled across this question. Anyway I found the link and thought I should share it:
http://xbox.create.msdn.com/downloads/?id=123&filename=DataStructures_CheatSheet.doc
这篇关于C#中收集数据类型的比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!