1
0
mirror of https://github.com/golang/go synced 2024-10-05 05:01:22 -06:00
go/src/cmd
Russ Cox 21af2d39c2 cmd/compile, cmd/link: eliminate string merging pass
Deleting the string merging pass makes the linker 30-35% faster
but makes jujud (using the github.com/davecheney/benchjuju snapshot) 2.5% larger.
Two optimizations bring the space overhead down to 0.6%.

First, change the default alignment for string data to 1 byte.
(It was previously defaulting to larger amounts, usually pointer width.)

Second, write out the type string for T (usually a bigger expression) as "*T"[1:],
so that the type strings for T and *T share storage.

Combined, these obtain the bulk of the benefit of string merging
at essentially no cost. The remaining benefit from string merging
is not worth the excessive cost, so delete it.

As penance for making the jujud binary 0.6% larger,
the next CL in this sequence trims the reflect functype
information enough to make the jujud binary overall 0.75% smaller
(that is, that CL has a net -1.35% effect).

For #6853.
Fixes #14648.

Change-Id: I3fdd74c85410930c36bb66160ca4174ed540fc6e
Reviewed-on: https://go-review.googlesource.com/20334
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2016-03-08 19:14:08 +00:00
..
addr2line cmd/addr2line: simplify windows test 2015-06-17 14:23:20 +00:00
api all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
asm cmd/internal/obj: add As type for assembly opcodes 2016-03-08 04:20:09 +00:00
cgo all: single space after period. 2016-03-02 00:13:47 +00:00
compile cmd/compile, cmd/link: eliminate string merging pass 2016-03-08 19:14:08 +00:00
cover all: single space after period. 2016-03-02 00:13:47 +00:00
dist all: single space after period. 2016-03-02 00:13:47 +00:00
doc all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
fix all: single space after period. 2016-03-02 00:13:47 +00:00
go cmd/go: set GOPATH in list's Context 2016-03-03 09:09:16 +00:00
gofmt all: single space after period. 2016-03-02 00:13:47 +00:00
internal cmd/compile, cmd/link: eliminate string merging pass 2016-03-08 19:14:08 +00:00
link cmd/compile, cmd/link: eliminate string merging pass 2016-03-08 19:14:08 +00:00
nm all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
objdump cmd/objdump: skip TestDisasm* for mips64{,le} 2015-09-10 18:27:09 +00:00
pack all: extract "can I exec?" check from tests into internal/testenv 2015-06-16 18:07:36 +00:00
pprof all: single space after period. 2016-03-02 00:13:47 +00:00
trace all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
vet cmd/vet: remove -test flag 2016-03-07 22:54:38 +00:00
yacc Rewrite leftover references to plan9.bell-labs.com to 9p.io. 2016-03-06 07:07:01 +00:00