[GHC] #11226: Performance regression (involving sum, map, enumFromThenTo)

GHC ghc-devs at haskell.org
Tue Dec 15 06:29:09 UTC 2015


#11226: Performance regression (involving sum, map, enumFromThenTo)
-------------------------------------+-------------------------------------
           Reporter:  j.waldmann     |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This program's performance suffers when compiled with 7.10, compared to
 7.8:
 {{{
 main = print $ sum $ map bitcount [0, 4 .. 2^24-1 ]

 bitcount :: Int -> Int
 bitcount x =
   if x > 0 then let (d,m) = divMod x 2 in bitcount d + m else 0
 }}}
 See discussion in this thread: https://mail.haskell.org/pipermail/haskell-
 cafe/2015-December/122485.html

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11226>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list