[GHC] #14672: Make likelyhood of branches/conditions available throughout the compiler.

GHC ghc-devs at haskell.org
Thu Jun 14 13:52:45 UTC 2018


#14672: Make likelyhood of branches/conditions available throughout the compiler.
-------------------------------------+-------------------------------------
        Reporter:  AndreasK          |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  CodeGen
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #849 #15124       |  Differential Rev(s):  Phab:D4316
       Wiki Page:                    |  Phab:D4324 Phab:D4327
-------------------------------------+-------------------------------------

Comment (by AndreasK):

 Doing this right might also help with performance being dependant on the
 syntactic order of Constructors in the end.

 For example containers has this note in Data.IntSet.Internal
 {{{
 -- [Note: Order of constructors]
 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 -- The order of constructors of IntMap matters when considering
 performance.
 -- Currently in GHC 7.0, when type has 3 constructors, they are matched
 from
 -- the first to the last -- the best performance is achieved when the
 -- constructors are ordered by frequency.
 -- On GHC 7.0, reordering constructors from Nil | Tip | Bin to Bin | Tip |
 Nil
 -- improves the benchmark by circa 10%.
 }}}

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


More information about the ghc-tickets mailing list