[Haskell-cafe] sum $ map f xs ... ghc-7.10 performance regression?

Phil Ruffwind rf at rufflewind.com
Tue Dec 15 05:21:42 UTC 2015


sum for lists is implemented using foldl rather than foldl' so I
suspect that's the origin of the issue.  Somehow, ($!) seems to give
GHC enough of a hint so as to optimize smarter thereby avoiding the
thunk build-up.  I don't know how this occurs though.


More information about the Haskell-Cafe mailing list