#4507: Data.List.sum and Data.List.product unnecessarily inefficient
-----------------------------+----------------------------------------------
Reporter: pozorvlak | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: libraries/base | Version: 7.0.1
Resolution: wontfix | Keywords: Data.List, sum, product, foldl'
Testcase: | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
-----------------------------+----------------------------------------------
Changes (by igloo):
* status: new => closed
* resolution: => wontfix
Comment:
The `foldl'` versions have different strictness behaviour to that
specified in the language definition, so for user-defined numeric types
they may have different behaviour.
If you would like to propose the behaviour is changed, please see the
[http://www.haskell.org/haskellwiki/Library_submissions library
submissions process].
Incidentally, did you compile your example with `-O`? With optimisation,
I'd expect the two to have similar performance.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4507#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs