diff options
| author | Ivan Osadchiy <ivan.osadchii@gmail.com> | 2019-04-13 16:55:24 +0300 |
|---|---|---|
| committer | Ilya Tokar <tocarip@gmail.com> | 2019-04-16 10:53:44 +0000 |
| commit | 36b0593f79c17c45985b17239e5f65d13da49949 (patch) | |
| tree | f1cfc54abc82857b71f7f2869a75f49acdd323d9 /src/cmd/api/goapi.go | |
| parent | 0f79510dc5d2e586924dae6e531529fe5fa7cbd2 (diff) | |
| download | go-git-36b0593f79c17c45985b17239e5f65d13da49949.tar.gz | |
crypto/sha256: Use bits.RotateLeft32 instead of ad-hoc implementation
Improves readability of the generic implementation.
Updates #31456.
Benchmarks (i7-4980HQ CPU)
name old time/op new time/op delta
Hash8Bytes-8 339ns ± 3% 337ns ± 2% ~ (p=0.595 n=5+5)
Hash1K-8 5.12µs ± 6% 4.97µs ± 6% ~ (p=0.310 n=5+5)
Hash8K-8 37.6µs ± 5% 38.1µs ± 6% ~ (p=0.841 n=5+5)
name old speed new speed delta
Hash8Bytes-8 23.6MB/s ± 3% 23.8MB/s ± 3% ~ (p=0.690 n=5+5)
Hash1K-8 200MB/s ± 6% 206MB/s ± 5% ~ (p=0.310 n=5+5)
Hash8K-8 218MB/s ± 5% 215MB/s ± 6% ~ (p=0.841 n=5+5)
Change-Id: Ic488841699138efde76e900bce1dd38fdbc88ec6
Reviewed-on: https://go-review.googlesource.com/c/go/+/171731
Reviewed-by: Ilya Tokar <tocarip@gmail.com>
Run-TryBot: Ilya Tokar <tocarip@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/api/goapi.go')
0 files changed, 0 insertions, 0 deletions
