SHA3 optimizations
@dcjones
contributed significant performance improvements to SHA3 (and some smaller benefits to SHA1/2 as well) while simultaneously reducing memory churn.
Previous performance on a 90MB file:
$ julia perf.jl ~/.julia/v0.6/BinaryBuilder/deps/downloads/rootfs-x86_64-apple-darwin14.tar.gz
read: 0.286516 seconds (6 allocations: 94.493 MiB, 32.75% gc time)
SHA-1: 0.569073 seconds (7 allocations: 960 bytes)
SHA2-256: 1.771765 seconds (6 allocations: 512 bytes)
SHA2-512: 1.289397 seconds (6 allocations: 656 bytes)
SHA3-256: 6.475997 seconds (728.55 k allocations: 88.935 MiB, 0.03% gc time)
SHA3-512: 13.375748 seconds (1.38 M allocations: 167.987 MiB, 0.02% gc time)
New performance on the same file:
$ julia perf.jl ~/.julia/v0.6/BinaryBuilder/deps/downloads/rootfs-x86_64-apple-darwin14.tar.gz
read: 0.203022 seconds (6 allocations: 94.493 MiB, 33.68% gc time)
SHA-1: 0.411811 seconds (7 allocations: 960 bytes)
SHA2-256: 1.460679 seconds (6 allocations: 512 bytes)
SHA2-512: 0.923359 seconds (6 allocations: 656 bytes)
SHA3-256: 1.568745 seconds (8 allocations: 992 bytes)
SHA3-512: 2.983240 seconds (8 allocations: 960 bytes)