diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2018-04-18 18:28:34 -0700 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2018-04-21 00:50:50 +0000 |
| commit | 566e3e074c089568412a44a8d315c2881cfd8e8f (patch) | |
| tree | f977d94bb790728d40e08f1a9b3c68b3e1039111 /src/runtime/sigqueue.go | |
| parent | f6ca6eddaa0ce78093094b3485aa21669c6c76b4 (diff) | |
| download | go-566e3e074c089568412a44a8d315c2881cfd8e8f.tar.xz | |
cmd/compile: avoid runtime call during switch string(byteslice)
This triggers three times while building std,
once in image/png and twice in go/internal/gccgoimporter.
There are no instances in std in which a more aggressive
optimization would have triggered.
This doesn't necessarily avoid an allocation,
because escape analysis is already able in many cases
to use a temporary backing for the string,
but it does at a minimum avoid the runtime call and copy.
Fixes #24937
Change-Id: I7019e85638ba8cd7e2f03890e672558b858579bc
Reviewed-on: https://go-review.googlesource.com/108035
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/runtime/sigqueue.go')
0 files changed, 0 insertions, 0 deletions
