mirror of
https://github.com/apple/swift-collections
synced 2026-11-29 05:14:20 +00:00
Add performance FIXME
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user