]> Cypherpunks repositories - gostls13.git/commit
runtime: improve performance of empty map with interface key type
authorcuiweixie <cuiweixie@gmail.com>
Fri, 9 Jun 2023 14:59:48 +0000 (22:59 +0800)
committerKeith Randall <khr@golang.org>
Wed, 9 Aug 2023 16:41:16 +0000 (16:41 +0000)
commitd32b4798f844882d20920b7e75e9a889d3d0036c
tree7b2c0c4c017ae1e36fa9ee2fb713d4fa19608213
parentcd589c8a73415afbf94a8976f20cbed9d4061ba6
runtime: improve performance of empty map with interface key type

name                            old time/op    new time/op    delta
MegEmptyMapWithInterfaceKey-10    15.5µs ± 0%     0.0µs ± 0%  -99.97%  (p=0.000 n=20+16)

name                            old alloc/op   new alloc/op   delta
MegEmptyMapWithInterfaceKey-10     0.00B          0.00B          ~     (all equal)

name                            old allocs/op  new allocs/op  delta
MegEmptyMapWithInterfaceKey-10      0.00           0.00          ~     (all equal)

Change-Id: I46248223100e98b7877464da640075d272c14802
Reviewed-on: https://go-review.googlesource.com/c/go/+/502075
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/alg.go
src/runtime/map.go
src/runtime/map_benchmark_test.go
src/runtime/map_test.go