
#14519: Exponential runtime performance regression in GHC 8.2 + Data.Text.Lazy + Text.RE.TDFA -------------------------------------+------------------------------------- Reporter: ntc2 | Owner: tdammers Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime | Test Case: performance bug | https://github.com/ntc2/ghc-8.2.1 | -regex-lazy-text- | bug/tree/07b7bb32c6e90e8f2d2eada4b59943f37e632d53 Blocked By: | Blocking: Related Tickets: #13745, #14564 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Specifically, running the minimal test code over defs-30000, with various flags, and an execution time limit of 1 second (enough to detect the "bad" behavior), gives us this list: {{{ unoptimized (-O0): Time: 101 ms no-float-in (-O -fno-float-in): Timeout exceeded no-strictness (-O -fno-strictness): Timeout exceeded no-full-laziness (-O -fno-full-laziness): Timeout exceeded no-specialise (-O -fno-specialise): Timeout exceeded no-do-eta-reduction (-O -fno-do-eta-reduction): Timeout exceeded no-cse (-O -fno-cse): Timeout exceeded no-case-merge (-O -fno-case-merge): Timeout exceeded no-enable-rewrite-rules (-O -fno-enable-rewrite-rules): Time: 88 ms no-worker-wrapper (-O -fno-worker-wrapper): Timeout exceeded }}} In other words, among these optimizations, `enable-rewrite-rules` seems to be the one that triggers the bad behavior. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14519#comment:34 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler