Optimization beyond the Module Border

Simon Peyton-Jones simonpj at microsoft.com
Thu Mar 20 05:00:25 EDT 2008

| > I'd be interested in any progress here -- we noticed issues with
| > optimisations in the stream fusion package across module boundaries
| > that we never tracked down. If there's some key things not firing,
| > that would be good to know.
| I suspect that if all modules are compiled -O0, then you recompile one
| module with -O2, high up in the dependency graph (i.e. it depends on
| many lower-level modules), plus all things that in turn depend on it
| (--make), you will not get the good performance you expect.  None of the
| lower-level functions will have exported inlinings or fusion rules into
| the interface file.  _All_ modules must be recompiled with -O2,
| especially the bottom of the dependency chain, to get the best benefit
| from optimisation.

Absolutely correct.

Should this be better documented?  If so, would someone like to think where in GHC's user manual they would have looked (or did look), and send me some text that would have helped them, had it been there?  As it were.


More information about the Glasgow-haskell-users mailing list