]> Cypherpunks repositories - gostls13.git/commit
crypto/sha512: add s390x assembly implementation
authorMichael Munday <munday@ca.ibm.com>
Mon, 25 Apr 2016 20:17:42 +0000 (16:17 -0400)
committerMichael Munday <munday@ca.ibm.com>
Tue, 26 Apr 2016 17:37:45 +0000 (17:37 +0000)
commit24a297286a3032223c432a830a53ebf102e08de4
treef3beba859bcb31eabb23b052f86d4fdf169b9d96
parent98b99d561225cc1d140360b217df2acc9aa1f746
crypto/sha512: add s390x assembly implementation

Renames block to blockGeneric so that it can be called when the
assembly feature check fails. This means making block a var on
platforms without an assembly implementation (similar to the sha1
package).

Also adds a test to check that the fallback path works correctly
when the feature check fails.

name        old speed      new speed       delta
Hash8Bytes  7.13MB/s ± 2%  19.89MB/s ± 1%  +178.82%   (p=0.000 n=9+10)
Hash1K       121MB/s ± 1%    661MB/s ± 1%  +444.54%   (p=0.000 n=10+9)
Hash8K       137MB/s ± 0%    918MB/s ± 1%  +569.29%  (p=0.000 n=10+10)

Change-Id: Id65dd6e943f14eeffe39a904dc88065fc6a60179
Reviewed-on: https://go-review.googlesource.com/22402
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/sha512/fallback_test.go [new file with mode: 0644]
src/crypto/sha512/sha512_test.go
src/crypto/sha512/sha512block.go
src/crypto/sha512/sha512block_decl.go
src/crypto/sha512/sha512block_generic.go [new file with mode: 0644]
src/crypto/sha512/sha512block_s390x.go [new file with mode: 0644]
src/crypto/sha512/sha512block_s390x.s [new file with mode: 0644]