Hello Xiao-Yong, Thursday, November 8, 2007, 10:41:11 PM, you wrote:
>> forM_ [0..n-2] $ \i -> do { return $! i; >> x <- readArray a i; return $! x; >> y <- readArray a (i+1); return $! y; >> writeArray a (i+1) (x+y) } >> >> such cycle should be approx. 3-10 times slower than C one > I didn't know you can do that. Anyway, I tried OP's C and > Haskell versions and the one with your strictness > annotations. It seems that the `$!' thing doesn't do much, > or it's not doing anything. i don't said that it will help, just that it may help. to know exactly, one should either understand ghc strictness analyzer, or check asm code -- Best regards, Bulat mailto:[EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe