Closed
Description
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/cipher -bench GCM
What did you expect to see?
Performance can be on par with OpenSSL (https://blog.cloudflare.com/content/images/2017/11/sym_key_1_core.png)
What did you see instead?
+20X slower than OpenSSL( https://blog.cloudflare.com/content/images/2017/11/go_sym_key_1_core.png)
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
as commentedon Nov 20, 2017
12.5MBps is exactly 100Mbps. This number seems too round to ignore, any thoughts on why it won't exceed the speed of a "fast ethernet" network interface? It would help to see the benchmark's output from your system as well.
williamweixiao commentedon Nov 20, 2017
Following is the result I got from some typical arm64 platform:
go test crypto/cipher -bench GCM
goos: linux
goarch: arm64
pkg: crypto/cipher
BenchmarkAESGCMSeal1K-32 50000 35735 ns/op 28.65 MB/s
BenchmarkAESGCMOpen1K-32 50000 35858 ns/op 28.56 MB/s
BenchmarkAESGCMSeal8K-32 5000 285102 ns/op 28.73 MB/s
BenchmarkAESGCMOpen8K-32 5000 278226 ns/op 29.44 MB/s
PASS
ok crypto/cipher 7.199s
as commentedon Nov 20, 2017
Taking a second look at the results and seeing arm64 instead of amd64, I realize the reason has already been stated in prior discussions: no assembly implementations for the platform. It's probably safe to disregard my previous inquisition.
matt2909 commentedon Nov 21, 2017
This looks to be a duplicate of #18498
titanous commentedon Nov 21, 2017
Duplicate of #18498. Closing.
gopherbot commentedon Nov 22, 2017
Change https://golang.org/cl/64490 mentions this issue:
crypto/aes: optimize arm64 AES implementation
vielmetti commentedon Jun 26, 2018
On arm64, Packet Type 2A / c1.large.arm Cavium ThunderX:
1.11beta1 is substantially faster than 1.10.2.