[Haskell-cafe] speed: ghc vs gcc vs jhc

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Feb 20 19:52:49 EST 2009

Hello John,

Saturday, February 21, 2009, 3:42:24 AM, you wrote:

>> this is true for *application* code, but for codec you may have lots of
>> code that just compute, compute, compute

> Yes indeed. If there is code like this out there for haskell, I would
> love to add it as a test case for jhc.

Crypto library has a lot of native haskell code computing hashes and
encrypting data

hopefully people will show other examples

btw, Galois Cryptol has haskell backend, are you know? with jhс
compilation it can probably generate as fast code as C backend does.
it will be very interesting for us and even look as something close to
production usage. i have crossposted message to Don

> I don't see a reason it wouldn't
> compile to be as fast as C, with the caveat that the strictness analyzer
> needs to be able to find all the unboxables.

there is one problem with haskell - it doesn't support variables and
complex control structures. this means that sometimes you need to
wrote more complex code to handle situation and as a result, it may be
slower than native C

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list