[MLton-user] defunctorize limit?
vesa.a.j.k at gmail.com
Wed Dec 12 02:54:42 PST 2007
On Dec 12, 2007 5:45 AM, Matthew Fluet <fluet at tti-c.org> wrote:
> On Mon, 10 Dec 2007, Sean McLaughlin wrote:
> > I'm experiencing some unexpected behavior. [...]
> > That is, when I inline a monomorphic function at type real, it runs 10X faster than
> > when I instantiate a functor with the exact same function body. [...]
> One thing that can happen when you manually duplicate code is that you
> introduce identical functions that are inlined independently.
Indeed. I would recommend trying the option -loop-passes 2 as
suggested by Ville recently:
BTW, this (inlining related performance issues) starts to feel a bit like a FAQ.
More information about the MLton-user