diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2016-03-23 15:27:23 -0700 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2016-03-24 16:52:19 +0000 |
| commit | fc4358951a451c18267c4eb9ef0fb941963cc995 (patch) | |
| tree | eecbc7af577d262dc25f872b23ca36c335053a52 /src/runtime | |
| parent | 570a2b0eecc6ae8e398b2f1b56785cc9cacf0dbe (diff) | |
| download | go-fc4358951a451c18267c4eb9ef0fb941963cc995.tar.xz | |
cmd/compile: avoid allocating a Nodes for readonly method receivers
We were allocating a Nodes for common method calls
that did not modify the Nodes.
Though there is no clear wall time impact,
this significantly reduces the number of allocations,
so it seems worth doing.
Passes toolstash -cmp.
name old alloc/op new alloc/op delta
Template 59.0MB ± 0% 58.6MB ± 0% -0.81% (p=0.000 n=25+25)
Unicode 41.4MB ± 0% 41.3MB ± 0% -0.18% (p=0.000 n=25+25)
GoTypes 198MB ± 0% 197MB ± 0% -0.80% (p=0.000 n=24+25)
Compiler 875MB ± 0% 865MB ± 0% -1.09% (p=0.000 n=25+25)
name old allocs/op new allocs/op delta
Template 581k ± 0% 520k ± 0% -10.42% (p=0.000 n=25+25)
Unicode 413k ± 0% 403k ± 0% -2.30% (p=0.000 n=25+25)
GoTypes 1.78M ± 0% 1.58M ± 0% -11.18% (p=0.000 n=25+25)
Compiler 7.66M ± 0% 6.47M ± 0% -15.51% (p=0.000 n=25+25)
Change-Id: I012a9f4b333821bdf61b4f2bdff4ce5c3b5d3057
Reviewed-on: https://go-review.googlesource.com/21056
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions
