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

GHC ghc-devs at haskell.org
Mon May 15 08:34:07 UTC 2017


#1600: Optimisation: CPR the results of IO
-------------------------------------+-------------------------------------
        Reporter:  simonmar          |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  lowest            |            Milestone:
       Component:  Compiler          |              Version:  6.6.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #8598             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by akio):

 simonpj: I've added two examples that use IO.

 After a bit of work I managed to make a big improvement on `x2n1`:

 {{{
 --------------------------------------------------------------------------------
         Program           Size    Allocs   Runtime   Elapsed  TotalMem
 --------------------------------------------------------------------------------
            bspt          -0.1%     +0.1%     0.007     0.007      0.0%
       cacheprof          -0.1%     +0.1%    +28.4%    +28.4%     +0.9%
            grep          -0.1%     -0.2%     0.000     0.000      0.0%
        maillist          -0.1%     -0.3%     0.053     0.053      0.0%
             hpg          -0.1%     -0.4%     0.205     0.205      0.0%
             pic          -0.1%     -0.6%     0.007     0.007      0.0%
       compress2          +0.2%     -0.9%     0.196     0.196    -19.2%
           infer          -0.1%     -1.2%     0.069     0.069      0.0%
          sphere          -0.1%     -1.7%     0.049     0.049      0.0%
           solid          -0.1%     -6.6%     0.127     0.169      0.0%
            x2n1          -0.1%    -84.7%     0.006     0.006      0.0%
 --------------------------------------------------------------------------------
             Min          -0.1%    -84.7%    -37.7%    -35.7%    -19.2%
             Max          +0.2%     +0.1%    +34.3%    +34.2%     +0.9%
  Geometric Mean          -0.1%     -1.9%     -2.6%     -1.3%     -0.2%
 }}}

 I wonder if this improvement justifies the added complexity to the
 compiler (about 400 lines of code added under `compiler/`). Right now I
 don't see any way to make the analysis/transformation more effective.

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


More information about the ghc-tickets mailing list