
8 Nov
2007
8 Nov
'07
1:51 p.m.
"Dan Piponi"
Even though 'n' is 10 times bigger in the C program it runs much faster than the Haskell program on my MacBook Pro with Haskell 6.6.1. I've tried lots of different combinations of flags that I've found in various postings to haskell-cafe but to no avail.
import Data.List main = do print $ foldl' (+) 0 $ take 100000000 [1.0,1.0..] works 10 times faster than your C version. You just need to adapt to the radically different style of programming. Real Fortran programmer may write Fortran programs on any programming language :) -- JID: dottedmag@jabber.dottedmag.net