Shouldn't be hard to implement a basic tail recursion optimization: If the last operation in a function is a call to the same function, replace the call with jump to start. 1
Clinger98 is probably a good start. I came up with this issue after seeing the added tail call interpreter to Python 3.14, although it seems quite different than this optimization. 2
Shouldn't be hard to implement a basic tail recursion optimization: If the last operation in a function is a call to the same function, replace the call with jump to start. 1
Clinger98 is probably a good start. I came up with this issue after seeing the added tail call interpreter to Python 3.14, although it seems quite different than this optimization. 2
Footnotes
https://en.wikipedia.org/wiki/Tail_call ↩
https://x.com/charliermarsh/status/1888384047682093248?s=46&t=yUnnWYe3WhbU_1enl6udgw ↩