Hmm, wouldn't it be better to prove that the optimizations on a loop can also be performed on a recursion and then applying it? If they can't do that, how can they take the optimized loop, turn it back into a recursive structure, and assume that it is functionally identical to the starting recursive loop?
fellowniusmonk•46m ago
Yngve depth is how many things your brain has to keep open at once when reading code. More nesting and overlapping, center-embedded obligations in recursive code (especially side effects) raise that load, independent of Big-O. Recursion isn’t a hardware thing; it compiles to iteration, so the trouble comes from how the code is written, not recursion itself. Optimizing for Kolmogorov complexity can make code shorter yet harder to parse, so naming and linearizing steps adds bytes but lowers the mental stack. Which is why heavily recursive code get's less optimization attention in most instances than loops.
ambicapter•1h ago