On Sat, Feb 23, 2008 at 3:52 PM, Lemmih <[EMAIL PROTECTED]> wrote:
> Hiya,
>
>  I've encountered something I don't understand in E.Subst.
>  The substitution routine is very eager to inline stuff. It inlines all
>  the simple applications it can find.
>  Consider the following example:
>  (\a -> a+a) expensive
>  The substitution routine will inline that to:
>  expensive+expensive
>  Wouldn't it be prudent to generate this instead:
>  let a = expensive in a + a
>
>  Whether to inline it further would be decided later on.

Actually, it might be wise not to do any optimizations in the
substitution routine. I assume constant applications are handled
elsewhere as well?

-- 
Cheers,
 Lemmih
_______________________________________________
jhc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/jhc

Reply via email to