1
0
mirror of https://github.com/golang/go synced 2024-10-04 16:21:22 -06:00
go/src/cmd/gc
Rémy Oudompheng 386ad0ab90 cmd/gc: enable inlining in generated method wrappers.
Method calls on interfaces with large stored values
will call the pointer receiver method which may be
a wrapper over a method with value receiver.

This is particularly inefficient for very small bodies.
Inlining the wrapped method body saves a potentially expensive
function call.

benchmark                old ns/op    new ns/op    delta
BenchmarkSortString1K       802295       641387  -20.06%
BenchmarkSortInt1K          359914       238234  -33.81%
BenchmarkSortInt64K       35764226     22803078  -36.24%

Fixes #4707.

R=golang-dev, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/7214044
2013-03-11 21:24:51 +01:00
..
align.c cmd/gc: silence redundant error prints for misuse of [...]int 2013-02-01 21:21:27 -05:00
bisonerrors cmd/gc: support GNU Bison 2.7 in bisonerrors 2013-01-30 15:06:35 -08:00
bits.c gc: format nits 2011-11-07 11:42:08 -05:00
builtin.c cmd/gc: fix mkbuiltin (gc -A always write all symbols to export section) 2013-02-26 03:14:59 +08:00
closure.c cmd/gc: apply escape analysis results to closures. 2013-02-26 00:40:28 +01:00
const.c cmd/gc: simplify and fix defaultlit. 2013-03-04 16:51:42 +01:00
cplx.c cmd/gc: contiguous loop layout 2012-05-30 18:07:39 -04:00
dcl.c cmd/gc: emit explicit type information for local variables 2013-02-25 12:13:47 -05:00
doc.go cmd/godoc: use go/build to determine package and example files 2013-02-19 11:19:58 -08:00
esc.c src/cmd/gc: fix some typos in the escape analysis comments 2013-02-14 15:38:57 -08:00
export.c cmd/gc: fix mkbuiltin (gc -A always write all symbols to export section) 2013-02-26 03:14:59 +08:00
fmt.c cmd/gc: unbreak exporting of composite literals. 2013-03-04 16:42:03 +01:00
gen.c cmd/gc, reflect, runtime: switch to indirect func value representation 2013-02-21 17:01:13 -05:00
go.errors gc: improve error message for composite literals with unexpected newlines 2012-04-02 11:00:55 -04:00
go.h cmd/gc: implement new return requirements 2013-03-04 17:02:04 -05:00
go.y cmd/gc: implement new return requirements 2013-03-04 17:02:04 -05:00
init.c cmd/gc: do not generate code for var _ = ... unless necessary 2012-12-30 12:01:53 -05:00
inl.c cmd/gc: enable inlining in generated method wrappers. 2013-03-11 21:24:51 +01:00
lex.c cmd/gc: implement new return requirements 2013-03-04 17:02:04 -05:00
Makefile build: update Makefile to track source code dependencies better 2012-03-13 03:31:11 +08:00
md5.c gc: shuffle #includes 2011-08-25 16:25:10 -04:00
md5.h
mkbuiltin gc: fix comment in mkbuiltin 2012-02-14 16:27:35 -05:00
mkbuiltin1.c gc: delete old unsafe functions 2012-02-13 15:37:35 -05:00
mkopnames gc: use octal escapes in mkopnames 2012-01-31 18:15:42 -08:00
mparith1.c cmd/gc: implement latest rules for checking make sizes 2013-02-03 14:28:44 -05:00
mparith2.c cmd/gc: error on constant shift overflows. 2012-02-16 00:19:42 +01:00
mparith3.c gc: make constant arith errors a little more friendly 2012-02-11 00:50:56 -05:00
obj.c cmd/gc: enable inlining in generated method wrappers. 2013-03-11 21:24:51 +01:00
order.c cmd/gc: fix eval order in select 2012-12-22 16:46:01 -05:00
pgen.c cmd/gc: don't emit type instructions for nonexisting locals 2013-02-27 19:47:14 +01:00
racewalk.c cmd/gc: avoid runtime code generation for closures 2013-02-22 14:25:50 -05:00
range.c test/fixedbugs/bug454.go: add a test for CL 6564052 2012-09-29 23:23:56 +08:00
reflect.c cmd/gc, cmd/ld: rename -b to -race 2013-01-06 22:47:39 -05:00
runtime.go cmd/gc: avoid runtime code generation for closures 2013-02-22 14:25:50 -05:00
select.c cmd/gc: fix eval order in select 2012-12-22 16:46:01 -05:00
sinit.c cmd/gc: treat &T{} like new(T): allocate on stack if possible 2013-02-02 23:54:21 -05:00
subr.c cmd/gc: enable inlining in generated method wrappers. 2013-03-11 21:24:51 +01:00
swt.c cmd/gc: accept cases with same value but different types in switch. 2013-02-26 00:45:43 +01:00
typecheck.c cmd/gc: implement new return requirements 2013-03-04 17:02:04 -05:00
unsafe.c gc: keep pointer to original node in constant rewrites. 2011-12-07 16:18:50 -05:00
unsafe.go gc: delete old unsafe functions 2012-02-13 15:37:35 -05:00
walk.c cmd/gc: implement new return requirements 2013-03-04 17:02:04 -05:00
y.tab.c cmd/gc: implement new return requirements 2013-03-04 17:02:04 -05:00
y.tab.h cmd/gc: put 'not used' message on correct line 2013-02-01 21:13:41 -05:00
yerr.h cmd/gc: allow new conversion syntax 2013-02-03 00:03:10 -05:00