I’d be interested and seeing some benchmarks of SHAKE256 (i.e. SHA-3 with the same security as the current SHA256 we use) vs SHA256.
Anyone up for running https://github.com/calmh/gohashcompare/releases/tag/v0.2 ?
I’d be interested and seeing some benchmarks of SHAKE256 (i.e. SHA-3 with the same security as the current SHA256 we use) vs SHA256.
Anyone up for running https://github.com/calmh/gohashcompare/releases/tag/v0.2 ?
My MacBook:
jb@syno:~ $ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
jb@syno:~ $ gohashcompare
Build: go1.5rc1 darwin-amd64
testing: warning: no tests to run
PASS
SHA256-8 5000 727188 ns/op 180.24 MB/s 32 B/op 1 allocs/op
SHAKE256-8 5000 585186 ns/op 223.98 MB/s 64 B/op 1 allocs/op
jb@syno:~ $
SHAKE256 is ~24% faster.
Build: go1.5rc1 linux-amd64
testing: warning: no tests to run
PASS
SHA256-4 5000 694416 ns/op 188.75 MB/s 32 B/op 1 allocs/op
SHAKE256-4 5000 557640 ns/op 235.05 MB/s 64 B/op 1 allocs/op
$ cat /proc/cpuinfo | head
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 61
model name : Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
stepping : 4
microcode : 0x1a
cpu MHz : 3099.992
cache size : 4096 KB
physical id : 0
Will run it on my raspberry pi as well when I am at home.
Intel® Core™ i3-3220T CPU @ 2.80GHz:
Build: go1.5rc1 linux-amd64
testing: warning: no tests to run
PASS
SHA256-4 5000 798853 ns/op 164.08 MB/s 32 B/op 1 allocs/op
SHAKE256-4 5000 641571 ns/op 204.30 MB/s 64 B/op 1 allocs/op
Intel® Core™ i5-4590S CPU @ 3.00GHz:
Build: go1.5rc1 linux-amd64
testing: warning: no tests to run
PASS
SHA256-4 5000 604590 ns/op 216.79 MB/s 32 B/op 1 allocs/op
SHAKE256-4 5000 489332 ns/op 267.86 MB/s 64 B/op 1 allocs/op
ARMv7 Processor rev 10 (v7l) / CuboxTV:
Build: go1.5rc1 linux-arm
testing: warning: no tests to run
PASS
SHA256-4 200 13660491 ns/op 9.59 MB/s 32 B/op 1 allocs/op
SHAKE256-4 100 23650765 ns/op 5.54 MB/s 64 B/op 1 allocs/op
Ok. So faster on fast computers, slower on ARM. Too bad.
also this way round on a slow 64bit CPU (Intel Atom N450)
Build: go1.5rc1 linux-amd64
testing: warning: no tests to run
PASS
SHA256-2 1000 3004399 ns/op 43.63 MB/s 32 B/op 1 allocs/op
SHAKE256-2 1000 3505903 ns/op 37.39 MB/s 64 B/op 1 allocs/op
My server (raspberry is coming tonight):
$ ./gohashcompare
Build: go1.5rc1 linux-amd64
testing: warning: no tests to run
PASS
SHA256-4 3000 766591 ns/op 170.98 MB/s 32 B/op 1 allocs/op
SHAKE256-4 5000 592075 ns/op 221.38 MB/s 64 B/op 1 allocs/op
$ cat /proc/cpuinfo |head
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Common KVM processor
stepping : 1
microcode : 0x1
cpu MHz : 3300.022
cache size : 4096 KB
physical id : 0
i5-3210M @ 2,50 GHz
Build: go1.5rc1 windows-amd64
testing: warning: no tests to run
PASS
SHA256-4 3000 761742 ns/op 172.07 MB/s 32
B/op 1 allocs/op
SHAKE256-4 5000 603260 ns/op 217.27 MB/s 64
B/op 1 allocs/op
i7-3615QM @ 2,30 GHz
[code]
Build: go1.5rc1 darwin-amd64
testing: warning: no tests to run
PASS
SHA256-8 5000 761386 ns/op 172.15 MB/s 32 B/op 1 allocs/op
SHAKE256-8 5000 599223 ns/op 218.74 MB/s 64 B/op 1 allocs/op[/code]
Thanks, all.