Closed GilesBathgate closed 3 years ago
Hi, sorry for the late reply! I had a look at the try_emplace
and also insert_or_assign
too, which were implemented with two lookups as well. I'm trying to reduce the code duplication that's already present.
@martinus Yes I can make a PR that removes the code duplication if you like, I just need some help getting the POC right.
I have an implementation in #116 that I'd like to merge. This fixes all two-lookup problems. I hope you don't mind that I don't use your PR!
fixed in #116
@martinus This is just an idea to implement single call to hash /
keyToIdx
when invoking try_emplace. Obviously needs work, but is it even right conceptually?