]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: inline convT2{I,E} when result doesn't escape
authorKeith Randall <khr@golang.org>
Sat, 17 Sep 2016 22:04:36 +0000 (15:04 -0700)
committerKeith Randall <khr@golang.org>
Mon, 19 Sep 2016 02:37:08 +0000 (02:37 +0000)
commit6129f37367686edf7c2732fbb5300d5f28203743
tree18dfa388342ea4868caab33c299be065d558be76
parent892d146a7aae17e5fe22e04b16ba4da7e3d8c767
cmd/compile: inline convT2{I,E} when result doesn't escape

No point in calling a function when we can build the interface
using a known type (or itab) and the address of a local.

Get rid of third arg (preallocated stack space) to convT2{I,E}.

Makes go binary smaller by 0.2%

benchmark                   old ns/op     new ns/op     delta
BenchmarkEfaceInteger-8     16.7          10.1          -39.52%

Update #17118
Update #15375

Change-Id: I9724a1f802bfa1e3957bf1856b55558278e198a2
Reviewed-on: https://go-review.googlesource.com/29373
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/builtin.go
src/cmd/compile/internal/gc/builtin/runtime.go
src/cmd/compile/internal/gc/fixedbugs_test.go
src/cmd/compile/internal/gc/iface_test.go [new file with mode: 0644]
src/cmd/compile/internal/gc/walk.go
src/runtime/iface.go
test/live.go