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

crypto/rsa: linux/arm64 Go 1.9 performance is +10X slower than OpenSSL #22807

Open
williamweixiao opened this issue Nov 19, 2017 · 1 comment
Open
Labels
help wanted NeedsFix Performance
Milestone

Comments

@williamweixiao
Copy link
Member

@williamweixiao williamweixiao commented Nov 19, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9.2 linux/arm64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="arm64"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_arm64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

What did you do?

go test crypto/rsa -bench .

What did you expect to see?

Performance can be on par with OpenSSL (https://blog.cloudflare.com/content/images/2017/11/pub_key_1_core-2.png)

What did you see instead?

+10X slower than OpenSSL (https://blog.cloudflare.com/content/images/2017/11/go_pub_key_1_core.png)

@titanous titanous added help wanted NeedsFix Performance labels Nov 21, 2017
@titanous titanous added this to the Unplanned milestone Nov 21, 2017
@vielmetti
Copy link

@vielmetti vielmetti commented Jun 26, 2018

Go 1.11beta1 is substantially faster than Go 1.10.2 on this test, on Cavium ThunderX / Packet c1.large.arm ("Type 2A").

ed@ed-2a-bcc-llvm:~$ go version
go version go1.10.2 linux/arm64
ed@ed-2a-bcc-llvm:~$ go test crypto/rsa -bench .
goos: linux
goarch: arm64
pkg: crypto/rsa
BenchmarkRSA2048Decrypt-96                    20          74651551 ns/op
BenchmarkRSA2048Sign-96                       20          77650290 ns/op
Benchmark3PrimeRSA2048Decrypt-96              50          35958813 ns/op
PASS
ok      crypto/rsa      8.809s
ed@ed-2a-bcc-llvm:~$ ~/go/bin/go1.11beta1 test crypto/rsa -bench .
goos: linux
goarch: arm64
pkg: crypto/rsa
BenchmarkRSA2048Decrypt-96                   100          11466566 ns/op
BenchmarkRSA2048Sign-96                      100          11855513 ns/op
Benchmark3PrimeRSA2048Decrypt-96             200           7684199 ns/op
PASS
ok      crypto/rsa      6.584s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsFix Performance
Projects
None yet
Development

No branches or pull requests

3 participants