On Fri, 2007-11-09 at 00:51 +0600, Mikhail Gusarov wrote: > "Dan Piponi" <[EMAIL PROTECTED]> writes: > > > 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 :)
Good point, but this is not true for the OP. Take a look at Dan's blog. It's linked on planet.haskell.org. BTW. I prefer: print 10000000.0 ;) _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe