[Haskell-cafe] sha1 implementation thats "only" 12 times slower then C

Donald Bruce Stewart dons at cse.unsw.edu.au
Tue Jul 3 20:23:15 EDT 2007

> inlining some of the functions definitely gave me a boost, so i am
> about 8.5 times slower then openssl sha1sum.  I dont really understand
> the core output, but after inlining i got a completely different
> profile output, i am guessing its because the cost of the inlined
> functions is spread to the callers.
> COST CENTRE                    MODULE               %time %alloc
> updateElem                     SHA1                  13.4    0.0
> sRotateL                       SHA1                  13.4    0.0
> hashElem                       SHA1                  12.5    0.0
> sXor                           SHA1                  10.9    0.0
> unboxW                         SHA1                  10.0    0.0

So I'd now dive in and seriously look at the Core for these guys.
Work out what they're doing, and how they differ from the C version.

-- Don

More information about the Haskell-Cafe mailing list