Generic | Non-Generic | Insert | Contains | Sort | Remove |
---|---|---|---|---|---|
List<T> | ArrayList | O(1) | O(n) | O(n log n) | O(n) |
Dictionary<K,V> | Hashtable | O(1) | O(1) | O(n log n) | O(1) |
SortedList<K,V> | SortedList | O(n) | O(n) | O(log n) | O(n) |
LinkedList<T> Queue<T> Stack<T> |
Queue Stack ListDictionary |
O(1) | O(n) | O(n log n) | O(n) |
SortedDictionary<K,V> | O(log n) | O(log n) | O(n) | O(log n) |
Saturday, March 10, 2007
C# Collection Performance
This is kinda for my own benefit. It's taken from here.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment