[Haskell-beginners] coming to grips with hackage
Heinrich Apfelmus
apfelmus at quantentunnel.de
Sat Feb 8 09:52:31 UTC 2014
Brandon Allbery wrote:
> I do find myself wondering if anyone has checked to see how important the
> inlining is these days; perhaps ghc's general performance (and a hat tip to
> Moore's law) has made it possible to consider compiling more stable
> libraries.
Lately, I have been looking at GHC Core output for unrelated reasons,
and it appears to me that cross-module inlining is essential to GHC
performance.
For instance, if you don't inline the monadic combinators (>>=) and
`return` for the IO monad and perform even more inlining afterwards,
performance can easily differ by an order of magnitude. The reason is
that the second argument of (>>=) is a closure. Closure creation is very
expensive compared to the sequence of primops you get after inlining.
Best regards,
Heinrich Apfelmus
--
http://apfelmus.nfshost.com
More information about the Beginners
mailing list