• Keith Randall's avatar
    cmd/compile: lower cse comparison depth · e6051de0
    Keith Randall authored
    Todd originally set cmpDepth to 4.  Quoting:
    
    I picked a depth of 4 by timing tests of `go tool compile arithConst_ssa.go` and `go test -c net/http`.
    
        3.89 / 3.92  CL w/cmpDepth = 1
        3.78 / 3.92  CL w/cmpDepth = 2
        3.44 / 3.96  CL w/cmpDepth = 3
        3.29 / 3.9   CL w/cmpDepth = 4
        3.3  / 3.93  CL w/cmpDepth = 5
        3.29 / 3.92  CL w/cmpDepth = 10
    
    I don't see the same behavior now, differences in those two benchmarks
    are in the noise (between 1 and 4).
    
    In issue 17127, CSE takes a really long time.  Lowering cmpDepth
    from 4 to 1 lowers compile time from 8 minutes to 1 minute.
    
    Fixes #17127
    
    Change-Id: I6dc544bbcf2a9dca73637d0182d3de1a5ae6c944
    Reviewed-on: https://go-review.googlesource.com/30257
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    e6051de0
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...