Re: [Haskell-cafe] Ghc: -O harmful?

2009-04-08 Thread Petr Skovron
> > -fno-state-hack? > > That, or > {-# LANGUAGE BangPatterns #-} > ... >   !pole <- liftM (build n . map read . words) getLine Works for me, thanks! Petr ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/l

Re: [Haskell-cafe] Ghc: -O harmful?

2009-04-06 Thread Daniel Fischer
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 benefi

Re: [Haskell-cafe] Ghc: -O harmful?

2009-04-06 Thread Don Stewart
-fno-state-hack? xofon: > > Hello all, > > I have a haskell program that runs an order of magnitude slower > when compiled with optimisations turned on. This happens on 6.8.2 > as well as 6.10.1: > > > p...@r4at184:/tmp[1]% ghc --make -fforce-recomp -o out buga.hs > [1 of 1] Comp

[Haskell-cafe] Ghc: -O harmful?

2009-04-06 Thread Petr Skovron
Hello all, I have a haskell program that runs an order of magnitude slower when compiled with optimisations turned on. This happens on 6.8.2 as well as 6.10.1: p...@r4at184:/tmp[1]% ghc --make -fforce-recomp -o out buga.hs [1 of 1] Compiling Main ( buga.hs, buga.o ) Li