• Josh Bleecher Snyder's avatar
    [dev.ssa] cmd/compile: add constant cache · 194c79c1
    Josh Bleecher Snyder authored
    The cache gets a 62% hit rate while compiling
    the standard library.
    
    
    name      old time/op    new time/op    delta
    Template     449ms ± 2%     443ms ± 4%  -1.40%  (p=0.006 n=23+25)
    GoTypes      1.54s ± 1%     1.50s ± 2%  -2.53%  (p=0.000 n=22+22)
    Compiler     5.51s ± 1%     5.39s ± 1%  -2.29%  (p=0.000 n=23+25)
    
    name      old alloc/op   new alloc/op   delta
    Template    90.4MB ± 0%    90.0MB ± 0%  -0.45%  (p=0.000 n=25+25)
    GoTypes      334MB ± 0%     331MB ± 0%  -1.05%  (p=0.000 n=25+25)
    Compiler    1.12GB ± 0%    1.10GB ± 0%  -1.57%  (p=0.000 n=25+24)
    
    name      old allocs/op  new allocs/op  delta
    Template      681k ± 0%      682k ± 0%  +0.26%  (p=0.000 n=25+25)
    GoTypes      2.23M ± 0%     2.23M ± 0%  +0.05%  (p=0.000 n=23+24)
    Compiler     6.46M ± 0%     6.46M ± 0%  +0.02%  (p=0.000 n=24+25)
    
    
    Change-Id: I2629c291892827493d7b55ec4d83f6973a2ab133
    Reviewed-on: https://go-review.googlesource.com/20026Reviewed-by: default avatarKeith Randall <khr@golang.org>
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    Reviewed-by: default avatarAlexandru Moșoi <alexandru@mosoi.ro>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    194c79c1
func.go 10.5 KB