]> Cypherpunks repositories - gostls13.git/commit
internal/runtime/maps: don't copy indirect key/elem when growing maps
authorKeith Randall <khr@golang.org>
Sat, 9 Nov 2024 01:17:15 +0000 (17:17 -0800)
committerKeith Randall <khr@golang.org>
Mon, 18 Nov 2024 18:28:01 +0000 (18:28 +0000)
commitd4b0bd28eef0a212930fb196230171a9f11e5ec4
treeb665f6ad604bf3b2926d71a99175f797937225f5
parentbcdaac63965473ce315681a7af7e169b741a01e1
internal/runtime/maps: don't copy indirect key/elem when growing maps

We can reuse the same indirect storage when growing, so we don't
need an additional allocation.

Change-Id: I57adb406becfbec648188ec66f4bb2e94d4b9cab
Reviewed-on: https://go-review.googlesource.com/c/go/+/625902
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>
src/internal/runtime/maps/map.go
src/internal/runtime/maps/table.go