]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: double speed of CSE phase
authorDavid Chase <drchase@google.com>
Thu, 11 Feb 2016 20:09:43 +0000 (15:09 -0500)
committerDavid Chase <drchase@google.com>
Mon, 22 Feb 2016 17:15:41 +0000 (17:15 +0000)
commitc3db6c95b6f933e1489565aa65a94edc880a3f3d
tree8bf6b2acdc4d80f7d9a7d7aedcc500ed5b4de804
parent88c1ef5b450a9cb50ee412b0240e135a74e64517
[dev.ssa] cmd/compile: double speed of CSE phase

Replaced comparison based on (*Type).String() with an
allocation-free structural comparison.  Roughly doubles
speed of CSE, also reduces allocations.

Checked that roughly the same number of CSEs were detected
during make.bash (about a million) and that "new" CSEs
were caused by the effect described above.

Change-Id: Id205a9f6986efd518043e12d651f0b01206aeb1b
Reviewed-on: https://go-review.googlesource.com/19471
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/gc/type.go
src/cmd/compile/internal/ssa/cse.go
src/cmd/compile/internal/ssa/type.go
src/cmd/compile/internal/ssa/type_test.go