whole program optimization

Don Stewart dons at galois.com
Thu Dec 27 13:28:26 EST 2007

> Am Sonntag, 23. Dezember 2007 13:35 schrieb Isaac Dupree:
> > GHC optimizes less effectively when parts of a program are in different
> > modules, or are exported from a module.
> By the way, does GHC do cross-package optimization (not just cross-module 
> optimization within packages)?

Yep, esp. with high levels of -O, code is unfolded into .hi files,
distributed with the package. You can, with enough INLINE, get full
inlining of your library into the unsuspecting user's program :)
(Data.Binary attempts this)

-- Don

More information about the Glasgow-haskell-users mailing list