diff options
| author | Russ Cox <rsc@golang.org> | 2014-10-17 13:10:42 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-10-17 13:10:42 -0400 |
| commit | cfafa9f4cb1a20c4a9490d5bd8e561e650562f54 (patch) | |
| tree | d140ac40423da5babe28864f6b56f895b713fd7a /src/encoding/gob/decoder.go | |
| parent | 0d81b72e1bf5518b503dbefd0764bfa7e47dcecf (diff) | |
| download | go-cfafa9f4cb1a20c4a9490d5bd8e561e650562f54.tar.xz | |
cmd/gc: don't use static init to initialize small structs, fields
Better to avoid the memory loads and just use immediate constants.
This especially applies to zeroing, which was being done by
copying zeros from elsewhere in the binary, even if the value
was going to be completely initialized with non-zero values.
The zero writes were optimized away but the zero loads from
the data segment were not.
LGTM=r
R=r, bradfitz, dvyukov
CC=golang-codereviews
https://golang.org/cl/152700045
Diffstat (limited to 'src/encoding/gob/decoder.go')
0 files changed, 0 insertions, 0 deletions
