3 ms·
Just posted this on the OP: There's a big issue with the unordered_map.erase(const_iterator) method -- STL mandates that .erase() returns an iterator to the ne
by phunge 12y ago
Just posted this on the OP:
There's a big issue with the unordered_map.erase(const_iterator) method -- STL mandates that .erase() returns an iterator to the next item in the container. There's no simple implementation of that for hashtables other than to walk the hashtable, which is quite slow.
This was once a serious performance issue with unordered_map (discussion here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41975 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41975). I haven't followed up in years, but is the issue?