]> Cypherpunks repositories - gostls13.git/commit
internal/runtime/maps: small maps point directly to a group
authorMichael Pratt <mpratt@google.com>
Wed, 14 Aug 2024 15:21:28 +0000 (11:21 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 28 Oct 2024 20:35:25 +0000 (20:35 +0000)
commit77e3d8cf13a31343ba98268c2dddf6bc41f6ce4c
treec1f21ea1356d5cccf04ae86aa4ad6539160106cb
parentbb46b754bebb0e820d74fd9eb02635afbdf5a3bd
internal/runtime/maps: small maps point directly to a group

If the map contains 8 or fewer entries, it is wasteful to have a
directory that points to a table that points to a group.

Add a special case that replaces the directory with a direct pointer to
a group.

We could theoretically do similar for single table maps (no directory,
just point directly to a table), but that is left for later.

For #54766.

Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest-swissmap
Change-Id: I6fc04dfc11c31dadfe5b5d6481b4c4abd43d48ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/611188
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/reflectdata/map_swiss.go
src/cmd/link/internal/ld/dwarf.go
src/internal/runtime/maps/export_test.go
src/internal/runtime/maps/map.go
src/internal/runtime/maps/map_swiss_test.go
src/internal/runtime/maps/map_test.go
src/internal/runtime/maps/table.go
src/runtime/map_swiss_test.go
src/runtime/runtime-gdb.py
src/runtime/runtime-gdb_test.go