Hi all.

To my horror, I've just discovered that ghc-2.04 appears to reverse the
recent trend of ghc releases by being significantly less efficient on
one of our Problem Child programs.  In particular, it both takes (even)
more memory to compile; and the object code size is (even!) bigger.

The program itself is a 292-rule Happy output text, in case this rings
a bell with anyone.  Under 2.02, it compiles in a "mere" 80Mb (probably
less, in fact), and produces a .o which is a tad over 1Mb in size.
Under 2.04, it seriously struggles to compile in 100MB (sob), and the
object code is nearer 2Mb.  Even that requires some juggling with compiler
flags; too many loops of the core2core simplifier, and it runs out of
heap in that phase; too few, and it runs out of heap in the code generator.

So my question is, does anyone have a clue what's going on, and better
yet, how to fix it?  Is there some 2.04-only optimisation that interacts
badly with this particular program, or is the compiler behaving "leakily"?
I'm suspecting the first is the more likely culprit at this point, from
the difference in simplifier activity between the two cases.

All advice gratefully received.

Cheers,
Alex.

Reply via email to