[GHC] #11284: Lambda-lifting fails in simple Text example

GHC ghc-devs at haskell.org
Fri Sep 7 08:34:39 UTC 2018


#11284: Lambda-lifting fails in simple Text example
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:  duplicate         |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #5945, #11318     |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by sgraf):

 * keywords:  LateLamLift =>


Comment:

 There's nothing to lift here anymore, all occuring functions turned into
 join points and the only actual let bindings in STG output are thunks,
 which can't be lifted.

 Here's an example run on `/usr/share/dict/words` (with an appropriate
 `main`):

 {{{
 $ ./Main +RTS -s < /usr/share/dict/words
 23
       33,832,464 bytes allocated in the heap
           24,088 bytes copied during GC
        2,011,952 bytes maximum residency (2 sample(s))
          163,024 bytes maximum slop
                1 MB total memory in use (0 MB lost due to fragmentation)

                                      Tot time (elapsed)  Avg pause  Max
 pause
   Gen  0        28 colls,     0 par    0.000s   0.000s     0.0000s
 0.0000s
   Gen  1         2 colls,     0 par    0.000s   0.000s     0.0001s
 0.0002s

   INIT    time    0.000s  (  0.000s elapsed)
   MUT     time    0.012s  (  0.012s elapsed)
   GC      time    0.001s  (  0.000s elapsed)
   EXIT    time    0.000s  (  0.000s elapsed)
   Total   time    0.013s  (  0.013s elapsed)

   %GC     time       0.0%  (0.0% elapsed)

   Alloc rate    2,822,899,212 bytes per MUT second

   Productivity  95.0% of total user, 95.5% of total elapsed
 }}}

 Strange enough, the `Data.Text.Lazy` variant of this is much slower and
 allocates much more, when I actually thought it would cope better with
 `getContents`. Whatever, this doesn't seem relevant to LateLamLift
 anymore.

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


More information about the ghc-tickets mailing list