]> Cypherpunks repositories - gostls13.git/commit
maps,runtime: improve maps.Clone
authorcuiweixie <cuiweixie@gmail.com>
Sun, 26 Feb 2023 23:15:50 +0000 (07:15 +0800)
committerKeith Randall <khr@golang.org>
Thu, 13 Apr 2023 17:28:28 +0000 (17:28 +0000)
commitb5a7f2eef7cb17255cb396cd4ff7df04957dd21e
tree8afaf1363e95ce83ca90e517e9bff35866f65401
parent1312d9e6da8d5d41bf8f2238c166deb1c5db10c3
maps,runtime: improve maps.Clone

name         old time/op    new time/op    delta
MapClone-10    65.8ms ± 7%    10.3ms ± 2%  -84.30%  (p=0.000 n=10+9)

name         old alloc/op   new alloc/op   delta
MapClone-10    40.2MB ± 0%    40.5MB ± 0%   +0.57%  (p=0.000 n=10+9)

name         old allocs/op  new allocs/op  delta
MapClone-10      20.0 ± 0%      23.0 ± 0%  +15.00%  (p=0.000 n=10+10)

Updates #58740.

Change-Id: I148501e723cb2124f02045400e7ceb36af0871c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/471400
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Keith Randall <khr@google.com>
src/maps/maps.go
src/maps/maps.s [new file with mode: 0644]
src/maps/maps_test.go
src/runtime/map.go