
#9344: takeWhile does not participate in list fusion -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Operating System: Unknown/Multiple Differential Revisions: | Type of failure: Runtime Architecture: | performance bug Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Comment (by nomeata):
As for speed, if I'm not very much mistaken it takes a lot of slowness and/or a good number of mispredicted branches to make up for the cache effects that excessive allocation will have when combined with non-trivial code, so I believe that should probably be a secondary concern.
True, and I’m not worried about that; I’m worried about the short- circuting of `takeWhile`: Does it properly stop the producer from calculating the rest of the list or not. From looking at the code I believe it does, though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9344#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler