summaryrefslogtreecommitdiff
path: root/src/lib9/tempdir_unix.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-01-06 20:43:44 -0500
committerRuss Cox <rsc@golang.org>2014-01-06 20:43:44 -0500
commitd227d680ece216603c31e36ee995b814259325dc (patch)
tree7999deb1a1c86a9f67fa4752794b86c582c19f33 /src/lib9/tempdir_unix.c
parent78c16c9b16dc9c64d1ddad6db5afaab12e87e8f2 (diff)
downloadgo-git-d227d680ece216603c31e36ee995b814259325dc.tar.gz
cmd/gc: use 100x less memory for []byte("string")
[]byte("string") was simplifying to []byte{0: 0x73, 1: 0x74, 2: 0x72, 3: 0x69, 4: 0x6e, 5: 0x67}, but that latter form takes up much more memory in the compiler. Preserve the string form and recognize it to turn global variables initialized this way into linker-initialized data. Reduces the compiler memory footprint for a large []byte initialized this way from approximately 10 kB/B to under 100 B/B. See also issue 6643. R=golang-codereviews, r, iant, oleku.konko, dave, gobot, bradfitz CC=golang-codereviews https://golang.org/cl/15930045
Diffstat (limited to 'src/lib9/tempdir_unix.c')
0 files changed, 0 insertions, 0 deletions