[GHC] #13745: Investigate compile-time regressions in regex-tdfa-1.2.2

GHC ghc-devs at haskell.org
Wed Nov 22 22:40:39 UTC 2017


#13745: Investigate compile-time regressions in regex-tdfa-1.2.2
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  high              |            Milestone:  8.2.3
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by ntc2):

 I'm observing an apparently **exponential run time performance
 regression** when combining GHC 8.2.1, `Data.Text.Lazy`, and
 `Text.RE.TDFA`. Here's my repo with simple test code illustrating the
 regression and timing stats: https://github.com/ntc2/ghc-8.2.1-regex-lazy-
 text-bug.

 In summary, for the problematic combination of GHC version and libraries,
 the run times are 3s, 10s, 22s, and 40s
 for counting regex matches in files with 10000,
 20000, 30000, and 40000 lines, respectively. For all of the
 unproblematic combinations -- i.e. GHC 8.0.2, `String`, strict
 `Data.Text`, or building with profiling -- the run time is always about
 1s!

 And this is a Heisenbug, in that the performance problem goes away if I
 build with profiling support!

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


More information about the ghc-tickets mailing list