On 2009 Mar 18, at 19:16, sylvain wrote:
Actually, times varie between runs. It tends to decrease (except for the
ghc generated binary), so I suppose it is due to OS cache effects.
Yet, I consistently observed that, according to "time", hello2 (jhc)
runs _faster_ than hello3 (gcc).

Something is wrong: how can Haskell be faster than C?

I suspect if you profile you'll find that Haskell's show is faster than C's printf, especially if the appropriate show instance is selected at compile time.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to