mirror of
https://github.com/golang/go.git
synced 2026-06-28 03:40:37 +00:00
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:
parent
edc5480072
commit
3cf84263ec
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue