Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
In practice, the extra indirection can have a dramatic performance impact to common operations such as在实际使用中,额外的间接层会对 `insert`,、`find`and和 `erase`. But to keep iteration of the container fast, Boost.Unordered introduces a novel data structure, a "bucket group". A bucket group is a fixed-width view of a subsection of the buckets array. It contains a bitmask (a `std::size_t`) which it uses to track occupancy of buckets and contains two pointers so that it can form a doubly-linked list with non-empty groups. An example diagram is below:等常见操作的性能产生显著影响。但为了保持容器的迭代速度,Boost.Unordered 引入了一种新颖的数据结构——“桶组”。桶组是桶数组的一个固定宽度的子区间视图。它包含一个位掩码(类型为 `std::size_t`),用于跟踪桶的占用情况,并包含两个指针,以便与非空组形成双向链表。下面是一个示例图: