3 ms·
Std::set is using red black trees, did you mean std unordered set?
by deadlypointer 3y ago
Std::set is using red black trees, did you mean std unordered set?
- anonymoushn 3y agoyes, the common complaint about separate chaining being effectively mandatory is about unordered_map and unordered_set. It looks like std::set suffers from essentially the same pathology though: you cannot use implementations with good data layouts (b-trees) because the standard imposes unreasonable requirements about iterator invalidation. See https://stackoverflow.com/a/26552219 https://stackoverflow.com/a/26552219