[GHC] #1600: Optimisation: CPR the results of IO

GHC ghc-devs at haskell.org
Mon Jan 13 17:01:04 UTC 2014


#1600: Optimisation: CPR the results of IO
-------------------------------------+-------------------------------------
        Reporter:  simonmar          |            Owner:  nomeata
            Type:  task              |           Status:  new
        Priority:  lowest            |        Milestone:  7.6.2
       Component:  Compiler          |          Version:  6.6.1
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  Runtime           |       Difficulty:  Moderate (less
  performance bug                    |  than a day)
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:  #8598
-------------------------------------+-------------------------------------

Comment (by nomeata):

 New numbers, after uprooting a bug where things unrelated to CPR (namely
 things alrady returning an unboxed tuple, with nothing to be CPRed inside)
 would suddenly get an `INLINE` flag, including some thunks. Finally a
 measurable positive change in the geometric mean!

 {{{
 --------------------------------------------------------------------------------
         Program           Size    Allocs   Runtime   Elapsed  TotalMem
 --------------------------------------------------------------------------------
            ansi          +0.3%     -0.1%      0.00      0.00     +0.0%
          awards          +0.3%     -0.1%      0.00      0.00     +0.0%
       compress2          +0.5%     -0.8%      0.11      0.11     -8.0%
        fibheaps          +0.3%     -0.3%      0.03      0.03     +0.0%
          gamteb          +0.3%     -0.2%      0.04      0.04     +0.0%
            grep          +0.3%     -0.1%      0.00      0.00     +0.0%
             hpg          +0.3%     -3.0%      0.13      0.13     +0.0%
           infer          +0.3%     -1.2%      0.04      0.04     +0.0%
    k-nucleotide          +0.1%     -6.9%     -1.3%     -1.1%     +0.0%
           kahan         -11.9%     -0.1%      0.17      0.17     +0.0%
        maillist          +0.3%     -0.8%      0.04      0.04    -22.5%
         mkhprog          +0.3%     -0.3%      0.00      0.00     +0.0%
             pic          +0.3%     -0.6%      0.00      0.00     +0.0%
          pretty          +0.3%     -0.1%      0.00      0.00     +0.0%
            rfib          +0.3%     -0.1%      0.01      0.01     +0.0%
             scc          +0.3%     -0.1%      0.00      0.00     +0.0%
   spectral-norm          +0.3%     -0.1%     +0.2%     +0.3%     +0.0%
          sphere          +0.3%     -4.7%      0.04      0.04     +0.0%
          symalg          +0.3%     -0.1%      0.01      0.01     +0.0%
             tak          +0.3%     -0.3%      0.01      0.01     +0.0%
       transform          +0.3%     +0.2%     -0.7%     -0.7%     +0.0%
       wave4main          +0.4%    +12.2%      0.21      0.21     +7.7%
 --------------------------------------------------------------------------------
             Min         -11.9%     -6.9%     -4.5%    -26.8%    -22.5%
             Max          +0.6%    +12.2%     +2.1%     +1.9%    +50.0%
  Geometric Mean          +0.2%     -0.1%     -0.3%     -2.1%     +0.1%
 }}}

 The increase of `wave4main` is due to a lost join point, as discussed in
 [wiki:NestedCPR/wave4main]. The increase in transform is not yet
 investigated (but will be, and then be discussed
 [wiki:NestedCPR#Motivatingexamples here]. I also did not look into the
 code size changes yet; `kahan` certainly looks interesting here...

 I was not especially careful about the runtime numbers, but I believe that
 the machine was unloaded when doing either ran. It certainly was when I
 was doing the baseline. So these are maybe a bit reliable.

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


More information about the ghc-tickets mailing list