[Haskell-cafe] haskell crypto is reaaaaaaaaaally slow

Donald Bruce Stewart dons at cse.unsw.edu.au
Wed Jun 20 02:22:54 EDT 2007


aeyakovenko:
> i don't think its a problem with bytestrings.  I strictly unpacked the
> bytestring and i still have 4 seconds for an md5 sum of the [word8]

Until someone writes an md5 on bytestrings, we can't really say how much
the slowdown is due to unpacking, GC and other memory stress building and
walking the big list, or the list-based md5 sum. There's a few sources
of problems once you decide to build a giant list from each byte in the
file.

I'd suspect a pure haskell md5 over bytestrings would be competitive
with a C implemetation though. Easier to just call OpenSSL.

-- Don


More information about the Haskell-Cafe mailing list