Re:Accidentally quadratic: When Python is faster than C++
by hashingroll on Thursday March 04, 2021 @11:46AM
(#26344706)
One reason would be because std::set guarantees O(log n) complexity for each operation on the worst case. std::unordered_set has average complexity O(1) and O(size) for the worst case (it being a hash table) which can be unexpected to debug in those rare cases.
[ Parent
| on HN ]
There are no comments on this comment yet.