#2438: memory performance problem when compiling lots of derived instances in a
single file
------------------------------------------+---------------------------------
Reporter: claus | Owner:
Type: compile-time performance bug | Status: closed
Priority: normal | Milestone: 6.10.1
Component: Compiler | Version: 6.9
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
------------------------------------------+---------------------------------
Changes (by simonpj):
* status: new => closed
* resolution: => fixed
Comment:
I declare this fixed, as a result of
{{{
Wed Sep 3 13:02:28 BST 2008 [EMAIL PROTECTED]
* Major change in compilation of instance declarations
(fix Trac #955, #2328)
}}}
Here are the timings
{{{
bash-3.2$ time ghc -c -fforce-recomp Instances.hs -package ghc
real 0m7.039s
user 0m6.546s
sys 0m0.361s
bash-3.2$ time ghc -c -fforce-recomp Instances0.hs -package ghc
real 0m1.271s
user 0m1.069s
sys 0m0.111s
bash-3.2$ time ghc -c -fforce-recomp All.hs -package ghc
real 0m8.727s
user 0m8.011s
sys 0m0.479s
bash-3.2$ wc *hs
355 1200 9779 All.hs
169 495 4559 Instances0.hs
211 758 5678 Instances.hs
735 2453 20016 total
}}}
I did residency measures too
{{{
All.hs 109M
Instances.hs 95M
Instances0.hs 29M
}}}
Timings are longer with -O, but similarly additive.
In the files you supplied, I replaced
{{{
deriving instance Typeable1 DeprecDecl
deriving instance Data a => Data (DeprecDecl a)
}}}
by
{{{
deriving instance Typeable1 WarnDecl
deriving instance Data a => Data (WarnDecl a)
deriving instance Typeable WarningTxt
deriving instance Data WarningTxt
}}}
which is, I suppose, because package `ghc` has changed. Otherwise they
are just as you supplied.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2438#comment:2>
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