]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: simplify efaceeq and ifaceeq
authorKeith Randall <khr@golang.org>
Fri, 24 Mar 2017 21:03:15 +0000 (14:03 -0700)
committerKeith Randall <khr@golang.org>
Fri, 24 Mar 2017 23:03:09 +0000 (23:03 +0000)
commite67d881bc3708d38fbe485d2264f38a699ce11fd
treec118cc7dfd2796046fd50852bc14856b37f16d65
parentc026c37f33c6037dcf71e16a1e79f78f3b5165c4
cmd/compile: simplify efaceeq and ifaceeq

Clean up code that does interface equality. Avoid doing checks
in efaceeq/ifaceeq that we already did before calling those routines.

No noticeable performance changes for existing benchmarks.

name            old time/op  new time/op  delta
EfaceCmpDiff-8   604ns ± 1%   553ns ± 1%  -8.41%  (p=0.000 n=9+10)

Fixes #18618

Change-Id: I3bd46db82b96494873045bc3300c56400bc582eb
Reviewed-on: https://go-review.googlesource.com/38606
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/builtin.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/walk.go
src/runtime/alg.go
src/runtime/runtime_test.go