[GHC] #10124: Simple case analyses generate too many branches

GHC ghc-devs at haskell.org
Mon Apr 20 14:44:36 UTC 2015


#10124: Simple case analyses generate too many branches
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.4
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #6135,            |  Differential Revisions:
  #9661,#10137                       |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 I think these numbers might be wrong due to mistakes on my side. Now I get
 {{{
 1 loops, best of 10: 27.1 sec per loop
 1 loops, best of 10: 41.5 sec per loop
 }}}

 so the branchless code is actually much more expensive.

 (This is testing `length $ filter myIsSpace $ concatMap (const
 ['\001'..'z']) $ [0..50000000::Int]` which produces better code than
 `replicate`.)

 Also in light of Sven Pannes’s valuable comments
 (https://mail.haskell.org/pipermail/ghc-devs/2015-April/008858.html) I’m
 inclined to abandon this idea.

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


More information about the ghc-tickets mailing list