[GHC] #14737: Improve performance of Simplify.simplCast
GHC
ghc-devs at haskell.org
Tue Apr 3 12:30:14 UTC 2018
#14737: Improve performance of Simplify.simplCast
-------------------------------------+-------------------------------------
Reporter: tdammers | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #11735 #14683 | Differential Rev(s): Phab:D4385
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tdammers):
Replying to [comment:13 simonpj]:
> On to `mkInstCo`. I see that it does an inefficient single-variable
substitution. So if we have
> {{{
> mkInstCo (mkInstCo (mkInstCo co (Refl t1))
> (Refl t2))
> (Refl t3)
> }}}
> we will traverse `co` three times (and `t1` twice etc). Bad bad.
>
> Idea: leave that to the coercion optimiser. Try simply removing the
first equation for `mkInstCo` leaving
> {{{
> mkInstCo = InstCo
> }}}
That doesn't seem to work well at all - I don't know how long exactly it
takes, but it's been compiling Grammar.hs for about half an hour now, so I
think it's safe to say that it's much slower now than the 8 seconds we got
previously. Unfortunately it's still running, so I can't say where the
time is going yet.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14737#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list