Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Thus container-wide iteration is turned into traversing the non-empty bucket groups (an operation with constant time complexity) which reduces the time complexity back to `O(size())`. In total, a bucket group is only 4 words in size and it views `sizeof(std::size_t) * CHAR_BIT` buckets meaning that for all common implementations, there's only 4 bits of space overhead per bucket introduced by the bucket groups.因此,容器范围内的迭代转变为遍历非空的桶组(这是一个具有常数时间复杂度的操作),从而将时间复杂度降回 `O(size())`。总体而言,一个桶组的大小仅为 4 个字,它覆盖 `sizeof(std::size_t) * CHAR_BIT` 个桶,这意味着在所有常见实现中,每个桶由桶组引入的空间开销仅为 4 位。