Subject: Re: [boost] Any interest in hashing algorithms SHA and/or FNV1a?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2013-11-14 14:34:19
On 14 Nov 2013 at 10:54, foster brereton wrote:
> I see what you mean now about the double-buffering, and my hash code
> is guilty of the same offense. I can look into modifying it to expose
> the process_block routine, however...
> I have been doing profiling of my SHA implementations, and copying the
> data around doesn't even show up on the radar -- the vast majority of
> the time, by far, is in the actual digest routine. The profile for MD5
> may look different, but at least in the case of SHA I don't know how
> much the straight-buffer-processing gains you.
In AFIO's hash engine I find the SIMD 4-SHA256 implementation is
*very* sensitive to unnecessary buffering. I suspect this is because
Ivy Bridge can run no more than four prefetchers at once, so the
4-SHA256 implementation which sucks in four separate streams exhausts
the prefetchers quickly.
BTW try your hash implementation on an Intel Atom! If you can get it
fast there, you'll have covered all your bases e.g. on ARM etc. I
spent quite some time getting my proof of concept implementation not
running pathologically slow on the Atom 220 netbook I'm using to type
this, and it was well worth the effort because I threw away my
previous design completely.
-- Currently unemployed and looking for work. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk