
On Sat, Nov 15, 2008 at 10:09 PM, Don Stewart
jwlato:
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.
Thanks for the reply. I'm compiling with -O2 -Wall. After looking at the Core output, I think I've found the key difference. A function that is bound in a "where" statement is different between the monolithic and split sources. I have no idea why, though. I'll experiment with a few different things to see if I can get this resolved. John