]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: cache sparse sets in Config
authorTodd Neal <todd@tneal.org>
Tue, 2 Feb 2016 11:35:34 +0000 (06:35 -0500)
committerTodd Neal <todd@tneal.org>
Tue, 2 Feb 2016 18:08:46 +0000 (18:08 +0000)
commit3297a4f5f320ca8262ba5d222d3571020a9460bc
tree8f033d19f164b6a0ea25f56f8046c26f59376f01
parent16b1fce9217886797940247f6ffce57e119c3e47
[dev.ssa] cmd/compile: cache sparse sets in Config

Move the cached sparse sets to the Config.  I tested make.bash with
pre-allocating sets of size 150 and not caching very small sets, but the
difference between this implementation (no min size, no preallocation)
and a min size with preallocation was fairly negligible:

Number of sparse sets allocated:
Cached in Config w/none preallocated no min size    3684 *this CL*
Cached in Config w/three preallocated no min size   3370
Cached in Config w/three preallocated min size=150  3370
Cached in Config w/none preallocated min size=150  15947
Cached in Func,  w/no min                          96996 *previous code*

Change-Id: I7f9de8a7cae192648a7413bfb18a6690fad34375
Reviewed-on: https://go-review.googlesource.com/19152
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/func.go