• Todd Neal's avatar
    [dev.ssa] cmd/compile: cache sparse sets in Config · 3297a4f5
    Todd Neal authored
    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/19152Reviewed-by: default avatarKeith Randall <khr@golang.org>
    3297a4f5
config.go 4.34 KB