Open RagnarGrootKoerkamp opened 5 years ago
Are you really that worried about the performance of m[x] = y? I'm also a bit uncomfortable with this hint parameter by the way, since apparently it behaves differently until C++11 then in C++11 and later [1].
std::insert
doesn't overwrite, while we need this to update an existing index to a better value. Just usingm[x]
works, but is much slower.https://github.com/TimonKnigge/TCR/blob/master/snippets/datastructures/increasing_function.cpp#L12