]> Cypherpunks repositories - gostls13.git/commit
crypto/sha256: add s390x assembly implementation
authorMichael Munday <munday@ca.ibm.com>
Mon, 25 Apr 2016 21:58:34 +0000 (17:58 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 27 Apr 2016 01:39:47 +0000 (01:39 +0000)
commit525ae3f897bf79fd78f3e693bd65056efc8f9109
treee06a50e0f306304faf0c815b2e58b98215dcd366
parent2a889b9d931e58166350f785b16edc51e28ef19b
crypto/sha256: 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  6.42MB/s ± 1%  27.14MB/s ± 0%  +323.01%  (p=0.000 n=10+10)
Hash1K      53.9MB/s ± 0%  511.1MB/s ± 0%  +847.57%   (p=0.000 n=10+9)
Hash8K      57.1MB/s ± 1%  609.7MB/s ± 0%  +967.04%  (p=0.000 n=10+10)

Change-Id: If962b2a5c9160b3a0b76ccee53b2fd809468ed3d
Reviewed-on: https://go-review.googlesource.com/22460
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/sha256/fallback_test.go [new file with mode: 0644]
src/crypto/sha256/sha256_test.go
src/crypto/sha256/sha256block.go
src/crypto/sha256/sha256block_decl.go
src/crypto/sha256/sha256block_generic.go [new file with mode: 0644]
src/crypto/sha256/sha256block_s390x.go [new file with mode: 0644]
src/crypto/sha256/sha256block_s390x.s [new file with mode: 0644]