Daniel Fischer wrote: > On Thursday 03 February 2011 23:19:31, Johan Tibell wrote: > > Hi, > > > > For what it's worth I saw the problems in your counting examples right > > away, without reading the explanatory text below. > > Yes, they were pretty obvious with enough experience. For beginners I > expect it to be a rather insidious trap. > > > Hopefully that means > > that it's possibly to learn how to spot such things without resorting > > to e.g. running the program or reading Core *gasp*. > > Within limits. Detrimental laziness or strictness can be arbitrarily well > hidden.
I am a relative newcomer to Haskell, but I think I have a reasonable understanding of the executaion model. Enough to fix performance issues in simple code like the example given. However, one of the Haskell projects I work on is Ben Lippmeier's DDC compiler. Thats about 50000 lines of Haskell code and finding performance issues there is really difficult. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe