[GHC] #8655: Evaluate know-to-terminate-soon thunks

GHC ghc-devs at haskell.org
Mon Jan 6 15:41:38 UTC 2014


#8655: Evaluate know-to-terminate-soon thunks
-------------------------------------+------------------------------------
        Reporter:  nomeata           |            Owner:  nomeata
            Type:  task              |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by nomeata):

 A first attempt looks promising:

 {{{
 --------------------------------------------------------------------------------
         Program           Size    Allocs   Runtime   Elapsed  TotalMem
 --------------------------------------------------------------------------------
            atom          +0.0%     -0.0%     +0.7%     +0.7%     +0.0%
    binary-trees          +0.0%     +0.0%     -0.4%     -0.4%     +0.0%
       cacheprof          +0.0%     +0.0%     -0.8%     +0.0%     +0.0%
         circsim          +0.0%     +0.0%     -2.7%     -2.7%     +0.0%
     constraints          +0.0%     +0.0%     -1.3%     -1.3%     +0.0%
    cryptarithm1          +0.0%     +0.0%     -1.5%     -1.0%     +0.0%
  fannkuch-redux          +0.0%     +0.0%     +0.1%     +0.2%     +0.0%
           fasta          +0.0%     +0.0%     -0.6%     +0.6%     +0.0%
          hidden          +0.0%     +0.0%     +0.0%     +0.7%     +0.0%
         integer          +0.0%     +0.0%     +0.2%     +0.2%     +0.0%
    k-nucleotide          +0.0%     +0.0%     -1.9%     -1.9%     +0.0%
            lcss          +0.0%     +0.0%     -1.6%     -0.8%     +0.0%
          n-body          +0.0%     +0.0%     -1.1%     -1.1%     +0.0%
            para          +0.0%     +0.0%     -1.9%     -2.8%     +0.0%
        pidigits          +0.0%     +0.0%     +0.0%     -1.1%     +0.0%
           power          +0.0%     +0.0%     -2.9%     -2.9%     +0.0%
             scs          +0.0%     +0.0%     +0.0%     +0.0%     +0.0%
   spectral-norm          +0.0%     +0.0%     +0.2%     +0.2%     +0.0%
       transform          +0.0%     +0.0%     -1.8%     -1.8%     +0.0%
       wave4main          +0.0%     +0.0%     -1.9%     -1.0%     +0.0%
    wheel-sieve1          +0.0%     +0.0%     +0.8%     +0.8%     +0.0%
 --------------------------------------------------------------------------------
             Min          -0.0%     -0.1%     -2.9%     -2.9%    -17.4%
             Max          +0.0%     +0.0%     +0.8%     +0.8%     +0.0%
  Geometric Mean          -0.0%     -0.0%     -0.9%     -0.7%     -0.2%
 }}}

 Such a speculative optimization cannot be expected to be a definite win,
 but I think the numbers are encouraging: No large increase and a
 detectable improvement in the mean.

 I put my code in `wip/cbv-conv-thunk`, which shares some patches with `wip
 /nested-cpr` that are not in master yet. Let’s see how that goes for a
 rebasing branch...

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


More information about the ghc-tickets mailing list