]> Cypherpunks repositories - gostls13.git/commit
runtime: get rid of concatstring's vararg C argument.
authorKeith Randall <khr@golang.org>
Tue, 3 Dec 2013 18:39:19 +0000 (10:39 -0800)
committerKeith Randall <khr@golang.org>
Tue, 3 Dec 2013 18:39:19 +0000 (10:39 -0800)
commit24699fb05c897dbaec3fe4f1d565c3c9da5078fc
treeae1fe6d673f7f4dc20f324246a0c8816a4ea842f
parentc0f229457731daa170fea3c8eb2c4f4c363266d3
runtime: get rid of concatstring's vararg C argument.

Pass as a slice of strings instead.  For 2-5 strings, implement
dedicated routines so no slices are needed.

static call counts in the go binary:
 2 strings: 342 occurrences
 3 strings:  98
 4 strings:  30
 5 strings:  13
6+ strings:  14

Why?  C varags, bad for stack scanning and copying.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/36380043
src/cmd/gc/builtin.c
src/cmd/gc/runtime.go
src/cmd/gc/walk.c
src/pkg/runtime/string.goc