cmd/link: batch writing of bytes

In best of 10, linking cmd/go shows a ~10% improvement.

tip:              real  0m1.152s user  0m1.005s
this:             real  0m1.065s user  0m0.924s

Change-Id: I303a20b94332feaedc1033c453247a0e4c05c843
Reviewed-on: https://go-review.googlesource.com/19978
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Shahar Kohanim 2016-02-29 11:49:49 +02:00 committed by David Crawshaw
parent 07ccc21295
commit d3b00a8cc4
2 changed files with 32 additions and 20 deletions

View file

@ -1850,6 +1850,10 @@ func Cseek(p int64) {
coutbuf.off = p
}
func Cwritestring(s string) {
coutbuf.WriteString(s)
}
func Cwrite(p []byte) {
coutbuf.Write(p)
}