mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-28 15:00:55 +01:00
insert() will only ever perform an insertion if the relevant element doesn't exist within the set, so we were doing an unnecessary lookup in two spots. We don't use emplace() here because it will need to construct the key for the element inside the allocated node (since the key may be non-copyable/non-movable), causing an allocation even if an insert doesn't actually occur. Conversely, insert() will not need to allocate and construct a node ahead of time if an element already exists in the set.