Add performance FIXME

This commit is contained in:
Karoy Lorentey authored and GitHub committed 2026-11-05 18:29:11 -08:00
1 parent 1735b98380
commit dbc1c194de
1 file changed
+1
@@ -43,6 +43,7 @@ extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable {
package mutating func _removeEntry(withMovedValueAt bucket: _Bucket) {
let shrink = self.count <= _HTable.minimumCapacity(forScale: self._scale)
unsafe _storage._keyPtr(at: bucket).deinitialize(count: 1)
// FIXME: Avoid fully resolving the hole when `shrink` is true -- see `_punchHole`
unsafe _storage._resolveHole(at: bucket)
if shrink {
_resize(minimumCapacity: self.count)