|
The problem is that a set::set::insert takes O(Nlog(size+N)) where N = number of elements to insert, so if I only want to inset one elemnt it results in O(log(size)). A std::sort takes O(Nlog(N)) where N = std::distance(first, last) which is in comparison way too much, sine my containers contain around 10 million elements.
|