patch applied (ghc): Major change in compilation of
instancedeclarations (fix Trac #955, #2328)
Claus Reinke
claus.reinke at talk21.com
Wed Sep 3 08:33:30 EDT 2008
> Wed Sep 3 05:02:28 PDT 2008 simonpj at microsoft.com
> * Major change in compilation of instance declarations (fix Trac #955, #2328)
>
> This patch makes an important change to the way that dictionary
> functions are handled. Before, they were unconditionally marked
> INLIINE, but all the code written by the user in the instance
> was inside that unconditionally-inlined function. Result: massive
> code bloat in programs that use complicated instances.
Sounds good.
But that inlining might also go a way towards partially evaluating
instance methods, if the inlining is bounded by finite types. So
limiting that inlining might result in slower code, escpecially for
libraries with complex instances (HList's record selection, say).
Is there a way to optionally enable the inlining of the instance
method code, rather than the short wrapper only? Were there
no cases where the code bloat was temporary, with the longer
compile-times actually being used to optimize the exposed
code into something smaller again?
And does this fix #2438, too?
Claus
More information about the Cvs-ghc
mailing list