]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: speed up cse
authorTodd Neal <todd@tneal.org>
Tue, 23 Feb 2016 23:52:17 +0000 (17:52 -0600)
committerDavid Chase <drchase@google.com>
Wed, 24 Feb 2016 16:57:05 +0000 (16:57 +0000)
commitb96189d1a046f7a70a632bd02106bd15e096dfa1
treead1e99951c0b8b66636fff6702e9b0f41c29b9ab
parent8906d2a171153ab337a88d4e9f59a7626ac55019
[dev.ssa] cmd/compile: speed up cse

Construct better initial partitions by recursively comparing values and
their arguments.  This saves one second on compile of arithConst_ssa.go
(4.3s to 3.3s) and shows a 3-5% increase with compilebench.

name       old time/op     new time/op     delta
Template       266ms ± 3%      253ms ± 4%  -5.08%          (p=0.032 n=5+5)
GoTypes        927ms ± 3%      885ms ± 2%  -4.55%          (p=0.016 n=5+5)
Compiler       3.91s ± 3%      3.73s ± 2%  -4.49%          (p=0.008 n=5+5)
MakeBash       31.6s ± 1%      30.5s ± 3%  -3.51%          (p=0.016 n=5+5)

Change-Id: I6ede31ff459131ccfed69531acfbd06b19837700
Reviewed-on: https://go-review.googlesource.com/19838
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/cse.go
src/cmd/compile/internal/ssa/type.go