[GHC] #15703: Significant compilation time blowup when refactoring singletons-heavy code
GHC
ghc-devs at haskell.org
Wed Oct 10 16:13:24 UTC 2018
#15703: Significant compilation time blowup when refactoring singletons-heavy code
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.8.1
Component: Compiler | Version: 8.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #15725 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
After some digging, I've found the commit that made compiling this program
become so much faster. It's commit
55a3f8552c9dc9b84e204ec6623c698912795347 (`Refactor coercion rule`). In
the commit prior, it took this long to build:
{{{
$ time ~/Software/ghc2/inplace/bin/ghc-stage2 -O1 -fforce-recomp Lib.hs
[1 of 2] Compiling Lib2 ( Lib2.hs, Lib2.o )
[2 of 2] Compiling Lib ( Lib.hs, Lib.o )
real 3m17.647s
user 3m17.776s
sys 0m0.168s
}}}
But if I apply that commit, it then takes this long to build:
{{{
$ time ~/Software/ghc2/inplace/bin/ghc-stage2 -O1 -fforce-recomp Lib.hs
[1 of 2] Compiling Lib2 ( Lib2.hs, Lib2.o )
[2 of 2] Compiling Lib ( Lib.hs, Lib.o )
real 0m26.102s
user 0m26.032s
sys 0m0.108s
}}}
This is quite a humorous coincidence, since up to this point I had been
under the impression that that commit had made compilation performance
slightly //worse// overall. But this shows I was completely wrong!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15703#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list