Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(70)

Issue 56900043: crypto/sha1: native ARM assembler version (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 6 months ago by Nick Craig-Wood
Modified:
7 years, 5 months ago
Reviewers:
dfc
Visibility:
Public.

Description

crypto/sha1: native ARM assembler version An ARM version of sha1block.go with a big improvement in throughput (up to 3x). This is a fully unrolled version for maximum performance but also maximum code size. Code size Before 1636 bytes After 5508 bytes 3.4x larger Benchmarks on Samsung Exynos 5 ARMv7 Chromebook benchmark old ns/op new ns/op delta BenchmarkHash8Bytes 2178 1365 -37.33% BenchmarkHash1K 19977 7046 -64.73% BenchmarkHash8K 146436 48919 -66.59% benchmark old MB/s new MB/s speedup BenchmarkHash8Bytes 3.67 5.86 1.60x BenchmarkHash1K 51.26 145.33 2.84x BenchmarkHash8K 55.94 167.46 2.99x

Patch Set 1 #

Patch Set 2 : diff -r 54a5513d9d6a https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -2 lines) Patch
M src/pkg/crypto/sha1/sha1block.go View 1 1 chunk +1 line, -1 line 0 comments Download
A src/pkg/crypto/sha1/sha1block_arm.s View 1 1 chunk +257 lines, -0 lines 0 comments Download
M src/pkg/crypto/sha1/sha1block_decl.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
dfc
1Ghz pandaboard, dual Cortex-A9 panda(~/go/src/pkg/crypto/sha1) % ~/go/misc/benchcmp {old,new}.txt benchmark old ns/op new ns/op delta BenchmarkHash8Bytes ...
7 years, 6 months ago (2014-01-28 10:57:02 UTC) #1
dfc
7 years, 6 months ago (2014-01-28 11:10:17 UTC) #2
On 2014/01/28 10:57:02, dfc wrote:
> 1Ghz pandaboard, dual Cortex-A9
> 
> panda(~/go/src/pkg/crypto/sha1) % ~/go/misc/benchcmp {old,new}.txt
> benchmark              old ns/op    new ns/op    delta
> BenchmarkHash8Bytes         8687         4182  -51.86%
> BenchmarkHash1K           106347        34841  -67.24%
> BenchmarkHash8K           785537       250411  -68.12%
> 
> benchmark               old MB/s     new MB/s  speedup
> BenchmarkHash8Bytes         0.92         1.91    2.08x
> BenchmarkHash1K             9.63        29.39    3.05x
> BenchmarkHash8K            10.43        32.71    3.14x

dfc@qnap:~/go/src/pkg/crypto/sha1$ cat /proc/cpuinfo 
processor       : 0
model name      : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1980.82
Features        : swp half thumb fastmult edsp 
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : QNAP TS-119/TS-219
Revision        : 0000
Serial          : 0000000000000000
dfc@qnap:~/go/src/pkg/crypto/sha1$ ~/go/misc/benchcmp {old,new}.txt
benchmark              old ns/op    new ns/op    delta
BenchmarkHash8Bytes         4539         2019  -55.52%
BenchmarkHash1K            56114        14468  -74.22%
BenchmarkHash8K           417030       102616  -75.39%

benchmark               old MB/s     new MB/s  speedup
BenchmarkHash8Bytes         1.76         3.96    2.25x
BenchmarkHash1K            18.25        70.77    3.88x
BenchmarkHash8K            19.64        79.83    4.06x
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b