[Haskell-cafe] Re: does the compiler optimize repeated calls?

Alex Queiroz asandroq at gmail.com
Wed Sep 6 08:50:59 EDT 2006


On 9/6/06, Lennart Augustsson <lennart at augustsson.net> wrote:
> Furthermore, doing that optimization (common subexpression
> elimination) can lead to space leaks.  So you should not count on the
> compiler doing it.  Besides, I often find it more readable and less
> error prone to name a common subexpression; only one place to change
> when you need to change the call.

     So there is no benefits from the "functions have no side-effects"
property, performance-wise. Pity.


More information about the Haskell-Cafe mailing list