]> Cypherpunks repositories - gostls13.git/commit
internal/runtime/maps: assume constant elem offset with int64 and string keys
authorKeith Randall <khr@golang.org>
Tue, 19 Nov 2024 00:23:43 +0000 (16:23 -0800)
committerKeith Randall <khr@golang.org>
Tue, 19 Nov 2024 21:15:45 +0000 (21:15 +0000)
commitc14fc500c772c35050699f3bcc3688db3d0fbed2
treec23de09b821e429fb3d934c7bcf7e1c36495d01f
parent253a9933d181ce5e57de81f56d7e50565c423f0f
internal/runtime/maps: assume constant elem offset with int64 and string keys

Note this doesn't work with int32 keys because alignment padding can change
the offset of the element.

Change-Id: I27804d3cfc7cc1b7f995f7e29630f0824f0ee899
Reviewed-on: https://go-review.googlesource.com/c/go/+/629418
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/reflectdata/map_swiss.go
src/internal/runtime/maps/runtime_fast64_swiss.go
src/internal/runtime/maps/runtime_faststr_swiss.go