]> Cypherpunks repositories - gostls13.git/commit
reflect: do not cache trivial values in DeepEqual.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Thu, 5 Sep 2013 19:37:07 +0000 (21:37 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Thu, 5 Sep 2013 19:37:07 +0000 (21:37 +0200)
commit780f5b714dfe9ede57e85cbb804d015981878df4
tree0f18e23749e3f02d4344fde35ea53b9334cb9be8
parentf2380a81d707c40e4f8950a2a01bd28a9f004b12
reflect: do not cache trivial values in DeepEqual.

DeepEqual caches addresses of compared values
each time it visits addressable values. This is
more expensive than actually comparing them in
the common case of large slices of bytes or integers.

Also add a fast path for slices with identical
underlying array.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13000044
src/pkg/reflect/deepequal.go