]> Cypherpunks repositories - gostls13.git/commit
crypto/aes: improve performance for aes-cbc on ppc64le
authorLynn Boger <laboger@linux.vnet.ibm.com>
Thu, 26 Aug 2021 12:09:50 +0000 (07:09 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Thu, 3 Mar 2022 13:39:12 +0000 (13:39 +0000)
commit2c6700739a6275b78a6af62707fd41783622061b
tree6e69a0ec89ce7dbcc7f55834e2adbcdbd3383ea0
parent86b5f6a7be707b9d84108df6f459c7e84bf9dbac
crypto/aes: improve performance for aes-cbc on ppc64le

This adds an asm implementation of aes-cbc for ppc64le to
improve performance. This is ported from the
cryptogams implementation as are other functions in
crypto/aes with further description at the top of
the asm file.

Improvements on a power10:

name             old time/op   new time/op    delta
AESCBCEncrypt1K   1.67µs ± 0%    0.87µs ±-48.15%
AESCBCDecrypt1K   1.35µs ± 0%    0.43µs ±-68.48%

name             old speed     new speed      delta
AESCBCEncrypt1K  614MB/s ± 0%  1184MB/s ± 0%+92.84%
AESCBCDecrypt1K  757MB/s ± 0%  2403M/s ± 0 +217.21%

A fuzz test to compare the generic Go implemenation
against the asm implementation has been added.

Change-Id: I18613dfc95c640820b8f1c60d29df638efc7a75c
Reviewed-on: https://go-review.googlesource.com/c/go/+/355429
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Paul Murphy <murp@ibm.com>
Trust: Paul Murphy <murp@ibm.com>
src/crypto/aes/asm_ppc64le.s
src/crypto/aes/cbc_ppc64le.go [new file with mode: 0644]
src/crypto/cipher/cbc.go
src/crypto/cipher/export_test.go
src/crypto/cipher/fuzz_test.go [new file with mode: 0644]