Am Montag 06 April 2009 20:37:46 schrieb Don Stewart:
> -fno-state-hack?
That, or
{-# LANGUAGE BangPatterns #-}
main = do
n <- read `liftM` getLine
!pole <- liftM (build n . map read . words) getLine
replicateM_ 100 $ do
getLine
print $ best pole 42 420
if the state-hack is beneficial in other places of the programme.
The bang on pole tells GHC to calculate it only once, not inline it.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe