Hello Chris, Saturday, August 5, 2006, 3:47:19 AM, you wrote:
>> in Haskell before blitting the data (whilst also retaining some >> semblance of functional programming...) the best way to optimize Haskell program (with current technologies) is to rewrite it in strict & imperative manner: >> cam_snap_3 cam f x = >> let end = snap_size cam >> loop ptr n x | ptr `seq` n `seq` x `seq` False = undefined >> | n >= end = return x >> | otherwise = do >> r <- peek ptr >> g <- peek (advancePtr ptr 1) >> b <- peek (advancePtr ptr 2) >> loop (advancePtr ptr 3) (n+3) (f r g b n x) >> in loop (cam_img cam) 0 x -- Best regards, Bulat mailto:[EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe