问题描述
我想了解 vers (这是 O(logarithmic(n))
)是一个ConcurrentDictionary只是一个并发同步实现a SortedList
?或这些数据结构是否不同?
ConcurrentDictionary< T,U>
并发版本字典< T,U>
。它不通过诸如 SortedList< T,U>
的键排序。复杂性与字典< T,U>
的复杂性密切相关,因此获取接近O(1)。
SortedList< T,U>
对于大多数提取操作具有O(log n)复杂度,因为它遍历内部排序结构。
I would like to understand the Computational Complexity of a ConcurrentDictionary
vers SortedList
(Which is O(logarithmic(n))
), is a ConcurrentDictionary just a concurrent synchronized implementation of a SortedList
? or do these data structures vary? among one another?
ConcurrentDictionary<T,U>
is a concurrent version of a Dictionary<T,U>
. It does not sort by keys like a SortedList<T,U>
. The complexity is closely related to a Dictionary<T,U>
's complexity, so fetches approach O(1).
SortedList<T,U>
has O(log n) complexity for most fetch operations since it's walking the internal sorted structure.
这篇关于是ConcurrentDictionary,“并发”版本的SortedList?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!