Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: SSA backend regression causing 6-7% runtime performance loss on crypto/sha3 #14745

Closed
karalabe opened this issue Mar 10, 2016 · 1 comment
Milestone

Comments

@karalabe
Copy link
Contributor

Discussing a possible assembly optimization on the SHA3 crypto package (https://go-review.googlesource.com/#/c/17962/), we've postponed a decision until the SSA branch is merged into develop to see the performance benefit of it.

Today I ran the crypto/sha3 benchmarks against Go 1.6 and Go tip to see how the SSA influences performance, and to my surprise it actually worsened runtime by 6-7%.

  • Old = Go 1.6
  • New = Go tip devel +dbe54d2 Thu Mar 10 07:01:34 2016 +0000 linux/amd64
benchmark                          old ns/op     new ns/op     delta
BenchmarkPermutationFunction-8     515           552           +7.18%
BenchmarkSha3_512_MTU-8            10635         11345         +6.68%
BenchmarkSha3_384_MTU-8            7866          8157          +3.70%
BenchmarkSha3_256_MTU-8            6084          6505          +6.92%
BenchmarkSha3_224_MTU-8            5803          6192          +6.70%
BenchmarkShake128_MTU-8            4878          5453          +11.79%
BenchmarkShake256_MTU-8            5298          5662          +6.87%
BenchmarkShake256_16x-8            76697         81353         +6.07%
BenchmarkShake256_1MiB-8           4057667       4343473       +7.04%
BenchmarkSha3_512_1MiB-8           7543614       8088382       +7.22%

benchmark                          old MB/s     new MB/s     speedup
BenchmarkPermutationFunction-8     388.34       361.78       0.93x
BenchmarkSha3_512_MTU-8            126.93       118.99       0.94x
BenchmarkSha3_384_MTU-8            171.60       165.49       0.96x
BenchmarkSha3_256_MTU-8            221.87       207.53       0.94x
BenchmarkSha3_224_MTU-8            232.61       218.02       0.94x
BenchmarkShake128_MTU-8            276.74       247.54       0.89x
BenchmarkShake256_MTU-8            254.81       238.41       0.94x
BenchmarkShake256_16x-8            213.62       201.39       0.94x
BenchmarkShake256_1MiB-8           258.42       241.41       0.93x
BenchmarkSha3_512_1MiB-8           139.00       129.64       0.93x

Given that everyone was expecting at least some increase in performance, these results are very surprising and imho can be cataloged as a serious regression.

@minux minux changed the title compiler/ssa: regression causing 6-7% runtime performance loss on crypto/sha3 cmd/compile: SSA backend regression causing 6-7% runtime performance loss on crypto/sha3 Mar 10, 2016
@minux minux added this to the Go1.7 milestone Mar 10, 2016
@gopherbot
Copy link

CL https://golang.org/cl/20488 mentions this issue.

@golang golang locked and limited conversation to collaborators Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants