cross module optimization issues

Don Stewart dons at
Sat Nov 15 17:09:56 EST 2008

> Hello,
> I have a problem with a package I'm working on, and I don't have any
> idea how to sort out the current problem.
> One part of my package is in one monolithic module, without an export
> list, which works fine.  However, when I've started to separate out
> certain functions into another module, and added an export list to one
> of the modules, which dramatically decreases performance.  The memory
> behavior (as shown by -hT) is also quite different, with substantial
> memory usage by "FUN_2_0".  Are there any suggestions as to how I
> could improve this?

Are you compiling with aggressive cross-module optimisations on (e.g.
-O2)? You may have to add explicit inlining pragmas (check the Core
output), to ensure key functions are exported in their entirety.

-- Don

More information about the Glasgow-haskell-users mailing list