[Haskell-cafe] Performance: MD5

Neil Mitchell ndmitchell at gmail.com
Sun May 18 04:54:30 EDT 2008


Hi

>> if you need maximum efficiency,
>> drop all this high-level code and map md5.c to haskell as it was done
>> in Don's blog
>
> Wait... you're telling me to give up? To not even try??

He's saying use the resources the community have already provided,  to
write it in a lower-level style, following much the same pattern as
Don did.

> So all that bravado about Haskell enabling higher-level optimisations to
> produce a result faster than C is actually complete nonesense?

Nope. If you just code up a simple algorithm in C and in Haskell, it
is pretty unlikely the Haskell one will go as fast as the C one. But
Haskell (in particular GHC) does have powerful low-level features that
means you can probably draw with C.

One day, I hope that high-level Haskell will outperform C all the
time. It's already true with some of the ByteString stuff, but
hopefully one day it will be a normal result. It's pretty much the
goal of this optimiser: http://www-users.cs.york.ac.uk/~ndm/supero/

Thanks

Neil


More information about the Haskell-Cafe mailing list