[GHC] #13253: Exponential compilation time with RWST & ReaderT stack with `-02`
GHC
ghc-devs at haskell.org
Tue Oct 16 15:28:18 UTC 2018
#13253: Exponential compilation time with RWST & ReaderT stack with `-02`
-------------------------------------+-------------------------------------
Reporter: phadej | Owner: bgamari, osa1
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
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: #15630 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Solution 1 (brutal): keep track of nesting depth, and simply stop
specialising at some depth.
Solution 2 (nicer): I think the actual code in this example looks like
{{{
join j1 x
= join j2 y
= join j3 z = blah3
in blah2
in blah1
in blah0
}}}
(only nested more deeply).
I've been working (slowly) on a join-point-floating patch that would do a
kind of local lambda lifting to give
{{{
join j3 x y z = blah3 in
join j2 x y = blah2 in
join j1 x = blah1 in
blah0
}}}
This would specialise a lot better, I think.
Tobias will try (1); I will get back to (2).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13253#comment:44>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list