
Hi, I'm looking for information on Haskell's viability for heavy integer math. My (very) naive tests show Haskell lagging behind C even when doing heavy (manual) inlining, compiling with special optimizations (funbox-strict-fields) and using continuation-passing-style when possible. Of course, being a beginner myself, I don't really know how good my code is. For reference, I wrote a simple MD5 implementation. It's as fast as the one in Happstack (Happstack.Crypto.MD5), which on my computer runs around 2.77 times slower then the base version from GNU coreutils (md5sum). GHC primitives appear as the next logical step in my tests, however I've been having problems using fixed sizes for integers (Word32# comes with no prim-ops defined?). Do you have any insights on this? Is it reasonable to expect Haskell integer performance to reach the levels of C with current implementations? Which are the limiting factors? Thanks!