]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: reduce element size of arrays in sparse{map,set}
authorDavid Chase <drchase@google.com>
Mon, 9 May 2016 18:59:25 +0000 (14:59 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 18 May 2016 14:05:14 +0000 (14:05 +0000)
commitd35a4158ab66aef99d9204c65cc2e2fa74b57a73
tree3ee31a60d1d975a0cdf82f2474fa81673733d193
parent2380a039c0457141e28f8f927139e1f9c38f8205
cmd/compile: reduce element size of arrays in sparse{map,set}

sparseSet and sparseMap only need 32 bit integers in their
arrays, since a sparseEntry key is also limited to 32 bits.
This appears to reduce the space allocated for at least
one pathological compilation by 1%, perhaps more.

Not necessarily for 1.7, but it saves a little and is very
low-risk.

Change-Id: Icf1185859e9f5fe1261a206b441e02c34f7d02fd
Reviewed-on: https://go-review.googlesource.com/22972
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/ssa/sparsemap.go
src/cmd/compile/internal/ssa/sparseset.go