]> Cypherpunks repositories - gostls13.git/commit
internal/runtime/maps: prune tombstones in maps before growing
authorKeith Randall <khr@golang.org>
Tue, 7 Jan 2025 05:53:22 +0000 (21:53 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 17 Apr 2025 16:45:34 +0000 (09:45 -0700)
commit05ed8a00e07e93fd40cf8269bdf16d6d2b34740d
tree3454228c270246d81e89e7781630d720046959e1
parent7b263895f7dbe81ddd7c0fc399e6a9ae6fe2f5bf
internal/runtime/maps: prune tombstones in maps before growing

Before growing, if there are lots of tombstones try to remove them.
If we can remove enough, we can continue at the given size for a
while longer.

Fixes #70886

Change-Id: I71e0d873ae118bb35798314ec25e78eaa5340d73
Reviewed-on: https://go-review.googlesource.com/c/go/+/640955
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/runtime/maps/group.go
src/internal/runtime/maps/map_test.go
src/internal/runtime/maps/runtime_fast32_swiss.go
src/internal/runtime/maps/runtime_fast64_swiss.go
src/internal/runtime/maps/runtime_faststr_swiss.go
src/internal/runtime/maps/table.go