Thread overview
Tail recursion optimization in DMD/LDC?
Sep 02, 2009
Nick Sabalausky
Sep 02, 2009
bearophile
September 02, 2009
Anyone know offhand if DMD and/or LDC do tail recusion optimization? Not a big deal, just curious.


September 02, 2009
On Wed, Sep 2, 2009 at 8:32 AM, Nick Sabalausky<a@a.a> wrote:
> Anyone know offhand if DMD and/or LDC do tail recusion optimization? Not a big deal, just curious.

I'm about 95% certain that DMD does it.
September 02, 2009
Nick Sabalausky:
> Anyone know offhand if DMD and/or LDC do tail recusion optimization? Not a big deal, just curious.<

Both perform it, but in both compiler this is a fragile feature, this means that it works only in precise situations. This feature in GCC is more flexible.

Bye,
bearophile