You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note: Our "build machine" is Linux, from which we compile for Linux (linux/amd64) and cross-compile for our other platforms (windows/amd64, aix/ppc64, linux/ppc64le).
go version go1.17.5 linux/amd64
Does this issue reproduce with the latest release?
Yes, for all versions of Go used to compile programs for aix/ppc64.
What operating system and processor architecture are you using (go env)?
Please note: Our "build machine" is Linux, from which we compile for Linux (linux/amd64) and cross-compile for our other platforms (windows/amd64, aix/ppc64, linux/ppc64le).
Our company implements a cross-platform application (linux/amd64, windows/amd64, aix/ppc, linux/ppc64le) that makes extensive use of HTTPS (TLS) within a client-server architecture. As a part of our development/test cycle, we CPU profile our application in different scenarios (using pprof). When doing so on AIX, we discovered that many of the src/crypto/aes block and stream cipher functions were a significant performance bottleneck for our application.
On further inspection, we found that "generic" versions (implemented in Go and not in pseudo-assembler) were being used for ppc64, which are significantly slower than their "optimized" ppc64le counterparts.
To work around these limitations, we've worked on customizing the Golang language by porting over ppc64le implementations of block and stream cipher functions to ppc64 into new files src/crypto/aes/asm_ppc64.s and src/crypto/aes/gcm_ppc64.s assembler files, then built out some of the higher-level Golang functions to make use of this assembler (with new src/crypto/aes/cipher_ppc64x.go and src/crypto/aes/gcm_ppc64.go files). We've then run the component unit tests to validate correctness.
The purpose of this issue is to see whether we could get these changes added to Golang so that this customization is no longer needed for us or others making extensive use of crypto features with Golang on aix/ppc64.
What did you expect to see?
Similar performance for HTTPS (TLS) block and stream cipher code as with other platforms.
What did you see instead?
Since much of the src/crypto/aes code for ppc64 is implemented in ("generic") Go, performance is worse on this platform.
The text was updated successfully, but these errors were encountered:
I have a CL for aes-cbc waiting to go in, so we should try to work together to avoid stepping over each other's work. @pmur has a change to leverage power9 to improve performance that will go on top of that.
Once those are in place we can generate a ppc64x.s file common to BE & LE and add #ifdefs for the endian specific instructions that need to be different. The original implementations are based on the cryptogams' implementations, where most of the code is common between BE & LE and therefore would be better to share a file than have separate files for ppc64 & ppc64le. A shared _ppc64x.s file is currently done for crypto/md5.
What version of Go are you using (
go version
)?Please note: Our "build machine" is Linux, from which we compile for Linux (linux/amd64) and cross-compile for our other platforms (windows/amd64, aix/ppc64, linux/ppc64le).
Does this issue reproduce with the latest release?
Yes, for all versions of Go used to compile programs for aix/ppc64.
What operating system and processor architecture are you using (
go env
)?Please note: Our "build machine" is Linux, from which we compile for Linux (linux/amd64) and cross-compile for our other platforms (windows/amd64, aix/ppc64, linux/ppc64le).
go env
OutputWhat did you do?
Our company implements a cross-platform application (linux/amd64, windows/amd64, aix/ppc, linux/ppc64le) that makes extensive use of HTTPS (TLS) within a client-server architecture. As a part of our development/test cycle, we CPU profile our application in different scenarios (using pprof). When doing so on AIX, we discovered that many of the
src/crypto/aes
block and stream cipher functions were a significant performance bottleneck for our application.On further inspection, we found that "generic" versions (implemented in Go and not in pseudo-assembler) were being used for ppc64, which are significantly slower than their "optimized" ppc64le counterparts.
To work around these limitations, we've worked on customizing the Golang language by porting over ppc64le implementations of block and stream cipher functions to ppc64 into new files
src/crypto/aes/asm_ppc64.s
andsrc/crypto/aes/gcm_ppc64.s
assembler files, then built out some of the higher-level Golang functions to make use of this assembler (with newsrc/crypto/aes/cipher_ppc64x.go
andsrc/crypto/aes/gcm_ppc64.go
files). We've then run the component unit tests to validate correctness.The purpose of this issue is to see whether we could get these changes added to Golang so that this customization is no longer needed for us or others making extensive use of crypto features with Golang on aix/ppc64.
What did you expect to see?
Similar performance for HTTPS (TLS) block and stream cipher code as with other platforms.
What did you see instead?
Since much of the
src/crypto/aes
code for ppc64 is implemented in ("generic") Go, performance is worse on this platform.The text was updated successfully, but these errors were encountered: