Re:Tail-call optimization in C is relatively recent
by amavect on Monday August 10, 2026 @04:37PM
(#49249361)
I recently played around with what I call "manual tail-call optimization": transform a tail call to a goto to the beginning of the function. Check it out: https://godbolt.org/z/3fY1v1oeW
I recommend against, of course! Incorrectly sequencing the manual version results in bugs (swap the assignment for n and a), which the recursive version doesn't need to care about.
[ Parent
| on HN ]