]> Cypherpunks repositories - gostls13.git/commit
An ARM version of sha1block.go with a big improvement in throughput
authorNick Craig-Wood <nick@craig-wood.com>
Wed, 12 Feb 2014 18:24:52 +0000 (13:24 -0500)
committerAdam Langley <agl@golang.org>
Wed, 12 Feb 2014 18:24:52 +0000 (13:24 -0500)
commit44c252bda29585b4ee9f18e77e68c658207e6f0a
tree0aa8e6021bc2f85f13f94dd2fa5fe190ced074bb
parent2ea859a7797472d6c7e401057d313c1d468a7a09
An ARM version of sha1block.go with a big improvement in throughput
(up to 2.8x).

This is a partially unrolled version which performs better for small
hashes and only sacrifices a small amount of ultimate speed to a fully
unrolled version which uses 5k of code.

Code size

  Before 1636 bytes
  After 1880 bytes
  15% larger

Benchmarks on Samsung Exynos 5 ARMv7 Chromebook

benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes         1907         1136  -40.43%
BenchmarkHash1K            20280         7547  -62.79%
BenchmarkHash8K           148469        52576  -64.59%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         4.19         7.04    1.68x
BenchmarkHash1K            50.49       135.68    2.69x
BenchmarkHash8K            55.18       155.81    2.82x

LGTM=dave, agl
R=dave, bradfitz, agl, adg, nick
CC=golang-codereviews
https://golang.org/cl/56990044
src/pkg/crypto/sha1/sha1block.go
src/pkg/crypto/sha1/sha1block_arm.s [new file with mode: 0644]
src/pkg/crypto/sha1/sha1block_decl.go