texitoi:
> After programming as an exercice the sum function, my version is
> faster than the Data.List's version. Looking at the source code,
> Data.List uses a foldl and not a foldl'. foldl' seems faster and
> allows to use very big lists. So, why is foldl used by Data.List for
> sum?
> 

It's considered a bug in the H98 report I think (since there was no
fold' at the time).

If you're summing sequences, have a look at Data.Vector for faster code.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to