[GHC] #10528: compile time performance regression with OverloadedStrings and Text

GHC ghc-devs at haskell.org
Thu Jul 30 09:08:00 UTC 2015


#10528: compile time performance regression with OverloadedStrings and Text
-------------------------------------+-------------------------------------
        Reporter:  jakewheat         |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  high              |               Milestone:  7.10.3
       Component:  Compiler          |                 Version:  7.10.2-rc2
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * owner:  bgamari =>
 * status:  merge => new


Comment:

 Unfortunately for reasons I don't yet understand, my testcase was not
 reliably reproducing the issue, which led me to believe that the phase
 control annotations resolved the issue. Sadly, it seems that this is not
 the case.

 Simon, I am a bit concerned that the phase control annotations aren't
 actually sufficient to resolve this issue. The problem being that the
 rules are being rewritten during the compilation of the module which
 defines them (`Data.Text.Show`); consequently the rules making it in to
 the interface file are still being rewritten to,
 {{{
 "TEXT literal" [2] forall a :: Addr#
   unstream (map
               safe
               (streamList
                  @ Char
                  (build @ Char (\ @ b -> unpackFoldrCString# @ b a))))
   = unpackCString# a
 }}}

 Perhaps I misunderstood: did you not expect this issue to be fixed via
 phase control?

 It seems that the only solution here is to fix the underlying issue:
 ensure that the LHS is not rewritten by merging the fix from comment:15.

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


More information about the ghc-tickets mailing list