]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/ssa: dominator tests and benchmarks
authorTodd Neal <todd@tneal.org>
Fri, 26 Jun 2015 04:13:57 +0000 (23:13 -0500)
committerKeith Randall <khr@golang.org>
Tue, 7 Jul 2015 19:42:35 +0000 (19:42 +0000)
commit41dafe6ecc358f294e0e91b739b352858d0c01b4
tree62cd1efa05b81699886ccdd9e0eecfe12573309e
parent7d10a2c04a28ac09448a3a890141a56870f86232
[dev.ssa] cmd/compile/ssa: dominator tests and benchmarks

This change has some tests verifying functionality and an assortment of
benchmarks of various block lists. It modifies NewBlock to allocate in
contiguous blocks improving the performance of intersect() for extremely
large graphs by 30-40%.

benchmark                           old ns/op      new ns/op     delta
BenchmarkDominatorsLinear-8         1185619        901154        -23.99%
BenchmarkDominatorsFwdBack-8        1302138        863537        -33.68%
BenchmarkDominatorsManyPred-8       404670521      247450911     -38.85%
BenchmarkDominatorsMaxPred-8        455809002      471675119     +3.48%
BenchmarkDominatorsMaxPredVal-8     819315864      468257300     -42.85%

BenchmarkNilCheckDeep1-8            766            706           -7.83%
BenchmarkNilCheckDeep10-8           2553           2209          -13.47%
BenchmarkNilCheckDeep100-8          58606          57545         -1.81%
BenchmarkNilCheckDeep1000-8         7753012        8025750       +3.52%
BenchmarkNilCheckDeep10000-8        1224165946     789995184     -35.47%

Change-Id: Id3d6bc9cb1138e8177934441073ac7873ddf7ade
Reviewed-on: https://go-review.googlesource.com/11716
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/dom.go
src/cmd/compile/internal/ssa/dom_test.go [new file with mode: 0644]
src/cmd/compile/internal/ssa/func.go