
#11226: Performance regression (involving sum, map, enumFromThenTo) -------------------------------------+------------------------------------- Reporter: j.waldmann | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by nomeata): * cc: nomeata (added) Comment: No time to look deeply, but: Does the problem go away if the list is not statically known and thus prevented from floated out, e.g.: {{{#!hs main = print $ foo (2^24-1) foo n = sum $ map bitcount [0, 4 .. n] {-# NOINLINE foo #-} bitcount :: Int -> Int bitcount x = if x > 0 then let (d,m) = divMod x 2 in bitcount d + m else 0 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11226#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler