aboutsummaryrefslogtreecommitdiff
path: root/src/internal/runtime/maps/table.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2025-08-20 16:53:09 -0700
committerKeith Randall <khr@golang.org>2025-09-10 15:06:08 -0700
commit8098b99547e2bb802c976a424e486ba94d3222a8 (patch)
treeb6224c0206bdc04db235a1f2239fe5a86877e0c0 /src/internal/runtime/maps/table.go
parentfe5420b054a091f59f5adbd78f4716d20c7f484c (diff)
downloadgo-8098b99547e2bb802c976a424e486ba94d3222a8.tar.xz
internal/runtime/maps: speed up Clear
We don't need to know the actual full slots, just whether there are any or not. The test for any full slots is simpler on amd64. We don't have to use PMOVMSKB and do the intreg->floatreg transfer. Fixes #75097 Change-Id: Iace1c100618d7fc2ac5ddd5fe9e8fe5c9595243f Reviewed-on: https://go-review.googlesource.com/c/go/+/697875 Reviewed-by: Youlin Feng <fengyoulin@live.com> Auto-Submit: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/internal/runtime/maps/table.go')
-rw-r--r--src/internal/runtime/maps/table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/runtime/maps/table.go b/src/internal/runtime/maps/table.go
index 49f392b8ae..a8160befd2 100644
--- a/src/internal/runtime/maps/table.go
+++ b/src/internal/runtime/maps/table.go
@@ -606,7 +606,7 @@ func (t *table) Clear(typ *abi.MapType) {
}
for i := uint64(0); i <= t.groups.lengthMask; i++ {
g := t.groups.group(typ, i)
- if g.ctrls().matchFull() != 0 {
+ if g.ctrls().anyFull() {
typedmemclr(typ.Group, g.data)
}
g.ctrls().setEmpty()