[Haskell-beginners] stack overflow summing numbers read from a big file

Axel Wegen axel.wegen at gmail.com
Mon Mar 25 12:04:07 CET 2013

Chaddaï Fouché <chaddai.fouche at gmail.com> writes:
> Well actually, you wouldn't run into this problem if you compiled with
> optimization options (ghc -O2 -o sumFile sumFile.hs) since the
> strictness analyzer is pretty good at spotting strict sums.
Yeah you are right. The strictness analyzer was also mentioned in one of
the links[1]. Had tried compiling with -O after reading it and it worked
also, just forgot to mention it. Thanks for pointing it out.

[1] http://www.haskell.org/haskellwiki/Performance/Strictness
Axel Wegen

More information about the Beginners mailing list