findSlotInsert are called two times. Why not: if (++aa.used * GROW_DEN > aa.dim * GROW_NUM) aa.grow(ti.key);auto p = aa.findSlotInsert(hash); // only one call is enough?if (p.deleted) --aa.deleted; ...If I am not wrong this modification will not corrupt the current state of the hash table?
`used` counts both filled and deleted buckets, so it shouldn't be incremented when changing a deleted bucket into a filled bucket.