]> Cypherpunks repositories - gostls13.git/commit
reflect: ensure map keys match key type in MapIndex and SetMapIndex
authorDan Kortschak <dan@kortschak.io>
Sat, 16 Apr 2022 13:15:06 +0000 (22:45 +0930)
committerGopher Robot <gobot@golang.org>
Sat, 30 Apr 2022 00:14:28 +0000 (00:14 +0000)
commit11a650bb4aabfd7998b61df3ac33f61831d7abff
tree0d9926bb0064409f1820776413038b633f60a7e5
parentf2b674756b3b684118e4245627d4ed8c07e518e7
reflect: ensure map keys match key type in MapIndex and SetMapIndex

name                          old time/op    new time/op    delta
Map/StringKeys/MapIndex-8           2.36µs ± 5%    2.55µs ±11%  +7.98%  (p=0.006 n=10+9)
Map/StringKeys/SetMapIndex-8        4.86µs ± 7%    4.77µs ± 1%    ~     (p=0.211 n=10+9)
Map/StringKindKeys/MapIndex-8       2.29µs ± 3%    2.28µs ± 4%    ~     (p=0.631 n=10+10)
Map/StringKindKeys/SetMapIndex-8    4.44µs ± 3%    4.61µs ± 1%  +3.78%  (p=0.000 n=10+10)
Map/Uint64Keys/MapIndex-8           3.42µs ± 9%    3.11µs ± 2%  -9.20%  (p=0.000 n=10+9)
Map/Uint64Keys/SetMapIndex-8        5.17µs ± 3%    5.00µs ± 1%  -3.23%  (p=0.000 n=9+10)

Fixes #52379

Change-Id: I545c71ea3145280828ca4186aad036a6c02016ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/400635
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/reflect/all_test.go
src/reflect/value.go