• fanzha02's avatar
    crypto/sha256: optimize arm64 sha256 implemention · 7b8a7f82
    fanzha02 authored
    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/61570Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    7b8a7f82
sha256block_arm64.go 424 Bytes