]> Cypherpunks.ru repositories - gostls13.git/commit
reflect: optimize DeepEqual() for maps
authorkorzhao <korzhao95@gmail.com>
Thu, 6 Jul 2023 03:12:29 +0000 (11:12 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 31 Jul 2023 15:44:01 +0000 (15:44 +0000)
commitf024e390bb0cb124487fd75f564ef8178ccba8f4
tree360aa2dabdf09638247b1adacb7594f8ed7a0329
parentc17e0cd2da0d69aba28d23aab12186eedc579dc1
reflect: optimize DeepEqual() for maps

benchmark                     old ns/op     new ns/op     delta
BenchmarkMapsDeepEqual-10     235           200           -15.05%

benchmark                     old allocs     new allocs     delta
BenchmarkMapsDeepEqual-10     7              6              -14.29%

benchmark                     old bytes     new bytes     delta
BenchmarkMapsDeepEqual-10     96            48            -50.00%

Change-Id: Ifa625ad25524cc9ee438711917606626b33a9597
Reviewed-on: https://go-review.googlesource.com/c/go/+/512576
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
src/reflect/benchmark_test.go
src/reflect/deepequal.go