runtime: prune tombstones before rehash in fast32 pointer-key insert

Change-Id: I08ade4ff3622007cf9e0e3b7a3cd0b9ad1e462ed
GitHub-Last-Rev: abf4ca52b3
GitHub-Pull-Request: golang/go#79030
Reviewed-on: https://go-review.googlesource.com/c/go/+/772060
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Weixie Cui 2026-04-29 15:24:01 +00:00 committed by Gopher Robot
parent edc5480072
commit 3cf84263ec

View file

@ -397,6 +397,10 @@ outer:
t.growthLeft++ // will be decremented below to become a no-op.
}
if t.growthLeft == 0 {
t.pruneTombstones(typ, m)
}
// If there is room left to grow, just insert the new entry.
if t.growthLeft > 0 {
slotKey := g.key(typ, i)