18 Mar
2009
18 Mar
'09
11:42 p.m.
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] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH