[Cryptography] sha1sum speed

Peter Bowen pzbowen at gmail.com
Mon May 2 11:31:25 EDT 2016


On Sun, May 1, 2016 at 5:33 PM, Henry Baker <hbaker1 at pipeline.com> wrote:
> At 01:01 PM 5/1/2016, Bill Cox wrote:
>>On Sun, May 1, 2016 at 8:00 AM, Henry Baker <hbaker1 at pipeline.com> wrote:
>>sha1sum took 24 seconds.
>>sha3sum (default algorithm) took 54 seconds.
>>sha256sum took 54 seconds.
>>b2sum-i686-linux took 35.7 seconds.
>>b2sum-amd64-linux took 27.3 seconds.
>>
>>This shows a major problem we face in Linux distros: we like everyone to run the same binary, so everyone is forced to use the oldest supported CPU instruction set.
>>
>>The program sha1sum is from the coreutils package, which AFAICT contains zero vector-optimization of any kind. Here's what I get with my version of b2sum, compiled with AVX2 support, vs sha1sum shipping with Ubuntu.  randfile is a 300MiB file, already cached:

How do the time compare to using 'openssl dgst -sha1'?  I *think* that
will use the optimized version.

Thanks,
Peter


More information about the cryptography mailing list