DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Tail-call optimization in C is relatively recent

Quality: 8/10 Relevance: 9/10

Summary

Tail-call optimization in C is not as old as many assume. The piece explains the historical constraints of C's calling convention, traces early GCC work by Mark Probst, discusses indirect calls and sibcalls, cites Xu & Kjolstad's Copy-and-Patch Compilation, and reports experiments showing modern GCC and Clang can perform tail-call optimization for the described patterns, with implications for VM-based languages like Gforth.

🚀 Service construit par Johan Denoyer