]> Cypherpunks repositories - gostls13.git/commit
crypto/sha256: optimize arm64 sha256 implemention
authorfanzha02 <fannie.zhang@arm.com>
Fri, 28 Jul 2017 04:14:45 +0000 (04:14 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 14 Nov 2017 18:18:02 +0000 (18:18 +0000)
commit7b8a7f8272fd1941a199af1adb334bd9996e8909
tree15963efc4840d6e870a4c1e937439b9ba838f6bd
parent44877315efba1c3e98ae7cde96fa46376fbaf0fd
crypto/sha256: optimize arm64 sha256 implemention

Optimize with ARMv8 SHA256 instructions.
Result (Cortex-A72)

name           old time/op    new time/op      delta
Hash8Bytes-64    1.54µs ± 1%      0.61µs ± 9%    -60.67%  (p=0.008 n=5+5)
Hash1K-64        17.2µs ± 1%       1.4µs ± 2%    -91.91%  (p=0.008 n=5+5)
Hash8K-64         127µs ± 0%         7µs ± 1%    -94.42%  (p=0.008 n=5+5)

name           old speed      new speed        delta
Hash8Bytes-64  5.20MB/s ± 1%   13.23MB/s ±10%   +154.58%  (p=0.008 n=5+5)
Hash1K-64      59.4MB/s ± 1%   735.1MB/s ± 2%  +1136.96%  (p=0.008 n=5+5)
Hash8K-64      64.5MB/s ± 0%  1156.3MB/s ± 1%  +1692.75%  (p=0.008 n=5+5)

Change-Id: I47eca6471b75cd07cb0c77477053a07d0de7494f
Reviewed-on: https://go-review.googlesource.com/61570
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/sha256/sha256block_arm64.go [new file with mode: 0644]
src/crypto/sha256/sha256block_arm64.s [new file with mode: 0644]
src/crypto/sha256/sha256block_generic.go