]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: lower cse comparison depth
authorKeith Randall <khr@golang.org>
Tue, 4 Oct 2016 17:01:48 +0000 (10:01 -0700)
committerKeith Randall <khr@golang.org>
Tue, 4 Oct 2016 19:35:56 +0000 (19:35 +0000)
commite6051de0351bb05d7409ee0d483f932e3530f816
tree1358af77aa3f87b6962cc68fc99b62cde69b5d06
parentfa49c3970a43ca77d46363397e7f4f3ae1f5957c
cmd/compile: lower cse comparison depth

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: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/cse.go