#2680: Type-checking performance regression
---------------------------------------------+------------------------------
Reporter: igloo | Owner:
Type: compile-time performance bug | Status: new
Priority: high | Milestone: 6.10.1
Component: Compiler (Type checker) | Version: 6.8.3
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Unknown/Multiple | Os: Unknown/Multiple
---------------------------------------------+------------------------------
Attached is a module Def1, which defines a load of type synonyms and some
values, and a module !ReExport1, which just re-exports Def1.
6.10 is comparable to 6.8 when compiling Def1, but rather than taking a
couple of seconds to compile !ReExport1 it takes about 3 minutes.
Def2/ReExport2 are the same, but only contain the type synonyms. The
difference in this case is 1 second vs 30 seconds.
GHC 6.8.2:
{{{
$ rm *.o; rm *.hi
$ time $GHC -O -fforce-recomp -c Def1.hs
$GHC -O -fforce-recomp -c Def1.hs 36.00s user 0.82s system 100% cpu
36.717 total
$ time $GHC -O -fforce-recomp -c ReExport1.hs
$GHC -O -fforce-recomp -c ReExport1.hs 2.22s user 0.11s system 100% cpu
2.332 total
$ time $GHC -O -fforce-recomp -c Def2.hs
$GHC -O -fforce-recomp -c Def2.hs 7.20s user 0.14s system 99% cpu 7.340
total
$ time $GHC -O -fforce-recomp -c ReExport2.hs
$GHC -O -fforce-recomp -c ReExport2.hs 0.99s user 0.08s system 100% cpu
1.075 total
$ $GHC --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2
}}}
6.10 branch:
{{{
$ rm *.o; rm *.hi
$ time $GHC -O -fforce-recomp -c Def1.hs
$GHC -O -fforce-recomp -c Def1.hs 35.94s user 0.60s system 100% cpu
36.350 total
$ time $GHC -O -fforce-recomp -c ReExport1.hs
$GHC -O -fforce-recomp -c ReExport1.hs 169.35s user 0.28s system 99% cpu
2:49.67 total
$ time $GHC -O -fforce-recomp -c Def2.hs
$GHC -O -fforce-recomp -c Def2.hs 8.37s user 0.11s system 100% cpu 8.477
total
$ time $GHC -O -fforce-recomp -c ReExport2.hs
$GHC -O -fforce-recomp -c ReExport2.hs 29.11s user 0.10s system 99% cpu
29.258 total
$ $GHC --version
The Glorious Glasgow Haskell Compilation System, version 6.10.0.20081009
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2680>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs