Re:Will It Optimize? (2010)
by mihai_ionic on Sunday October 26, 2014 @07:56AM
(#8510846)
Is there any reason why something like the following should not work?
while (condition)
{
a();
if (!condition)
break;
b();
}
Not necessarily. In the common case of a procedure calling itself a loop does wind up being equivalent. OTOH with mutually recursive procedures (two or more procedures which call each other), there is no straightforward way to convert the tail calls into a loop.