1
0
mirror of https://github.com/golang/go synced 2024-11-24 07:10:18 -07:00
go/src
Matthew Dempsky bba1ac4fd9 cmd/compile: stop adding implicit OKEY nodes
Keys are uncommon in array and slice literals, and normalizing
OARRAYLIT and OSLICELIT nodes to always use OKEY ends up not reducing
complexity much. Instead, only create OKEY nodes to represent explicit
keys, and recalculate implicit keys when/where necessary.

Fixes #15350.

name       old time/op     new time/op     delta
Template       299ms ± 9%      299ms ±12%    ~           (p=0.694 n=28+30)
Unicode        165ms ± 7%      162ms ± 9%    ~           (p=0.084 n=27+27)
GoTypes        950ms ± 9%      963ms ± 5%    ~           (p=0.301 n=30+29)
Compiler       4.23s ± 7%      4.17s ± 7%    ~           (p=0.057 n=29+27)

name       old user-ns/op  new user-ns/op  delta
Template        389M ±15%       400M ±12%    ~           (p=0.202 n=30+29)
Unicode         246M ±21%       232M ±22%  -5.76%        (p=0.006 n=28+29)
GoTypes        1.34G ± 8%      1.34G ± 7%    ~           (p=0.775 n=28+30)
Compiler       5.91G ± 6%      5.87G ± 7%    ~           (p=0.298 n=28+29)

name       old alloc/op    new alloc/op    delta
Template      41.2MB ± 0%     41.2MB ± 0%    ~           (p=0.085 n=30+30)
Unicode       34.0MB ± 0%     31.5MB ± 0%  -7.28%        (p=0.000 n=30+29)
GoTypes        121MB ± 0%      121MB ± 0%    ~           (p=0.657 n=30+30)
Compiler       511MB ± 0%      511MB ± 0%  -0.01%        (p=0.001 n=29+29)

name       old allocs/op   new allocs/op   delta
Template        390k ± 0%       390k ± 0%    ~           (p=0.225 n=30+29)
Unicode         318k ± 0%       293k ± 0%  -8.03%        (p=0.000 n=30+29)
GoTypes        1.16M ± 0%      1.16M ± 0%    ~           (p=0.745 n=30+30)
Compiler       4.35M ± 0%      4.35M ± 0%    ~           (p=0.105 n=30+30)

Change-Id: I6310739a0bfdb54f1ab8a460b2c03615ad1ff5bc
Reviewed-on: https://go-review.googlesource.com/32221
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-10-27 22:55:30 +00:00
..
archive
bufio
builtin
bytes bytes, strings: fix regression in IndexRune 2016-10-26 23:02:27 +00:00
cmd cmd/compile: stop adding implicit OKEY nodes 2016-10-27 22:55:30 +00:00
compress compress/flate: make compression level 0 consistent 2016-10-27 00:58:30 +00:00
container
context context: add comments to the WithCancel example, apply minor improvements 2016-10-26 22:35:07 +00:00
crypto crypto/tls: add GetClientCertificate callback 2016-10-27 17:20:07 +00:00
database/sql
debug
encoding encoding/json: marshal the RawMessage value type the same as its pointer type 2016-10-26 21:03:00 +00:00
errors
expvar
flag flag: arrange for FlagSet.Usage to be non-nil by default 2016-10-26 16:13:40 +00:00
fmt fmt: document that unexported struct fields don't get the String/Error treatment 2016-10-26 13:56:45 +00:00
go cmd/compile, go/parser: disallow "type T = p.T" - must use "=>" 2016-10-27 19:24:47 +00:00
hash
html
image image/png: implement truecolor transparency. 2016-10-27 22:27:41 +00:00
index/suffixarray
internal
io
log all: freeze net/rpc and reword the 'frozen' message in other frozen packages 2016-10-26 16:11:07 +00:00
math math/big: flip long/short flag on TestFloat32Distribution 2016-10-27 21:44:37 +00:00
mime mime: preserve unnecessary backslash escapes as literals 2016-10-27 17:54:59 +00:00
net net: add examples to Addr definition 2016-10-27 17:55:58 +00:00
os os: consider only files from #M as regular on Plan 9 2016-10-26 16:18:00 +00:00
path
plugin
reflect runtime: simplify reflectcall write barriers 2016-10-26 15:44:44 +00:00
regexp
runtime cmd/compile, runtime: make the go.itab.* symbols module-local 2016-10-27 19:13:35 +00:00
sort
strconv
strings bytes, strings: fix regression in IndexRune 2016-10-26 23:02:27 +00:00
sync
syscall
testing all: freeze net/rpc and reword the 'frozen' message in other frozen packages 2016-10-26 16:11:07 +00:00
text all: freeze net/rpc and reword the 'frozen' message in other frozen packages 2016-10-26 16:11:07 +00:00
time
unicode unicode/utf8: optimize ValidRune 2016-10-26 23:02:52 +00:00
unsafe
vendor/golang_org/x vendor/golang_org/x/crypto/poly1305: sync to 1150b8bd09e53aea1d415621adae9bad665061a1 2016-10-27 18:03:11 +00:00
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc