< Performance(Difference between revisions)
m (Performance:Modules moved to Performance/Modules)
Revision as of 20:23, 20 January 2006
|Haskell Performance Resource|
Use an explicit export list
If you do not have an explicit export list in a module, the compiler must assume that everything in that module will be exported. This disables various useful optimisations:
- If a function is used only once in the current module, and not exported, there is no penalty for inlining the function at its single use point.
- If a function is not used at all, and not exported, its definition can be discarded.
- The compiler has more flexibility regarding calling conventions and the like for functions that are not visible beyond the current compilation unit.