Re: clearing "return info" in a function

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
PeteE said...

You'd expect this to blow the stack, but it runs fine in the interpreter. And the translated code shows goto instead of recursive call! Seems Euphoria IS smart enough to detect and optimize tail calls - great job guys!

Yes, we have a special op code when we detect this, and act accordingly. It looks like that optimization never made it into the release notes, but this was included in 4.0.0.

Matt

I do remember it was noted somewhere, since I tested this feature as soon I learned about it.
I just searched 'tail recursion' phrase and found it here http://openeuphoria.org/wiki/view/ChangesFor4_0b2.wc

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu