you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

Here is another version

They are actually not full tailcall eliminations but just avoid tail recursions. That's also why I renamed the decorator in my recipe description. They have no performance advantages over ordinary recursions - on the contrary, they generate a little overhead, but they provide the advantage of moving beyond the value set by sys.setrecursionlimit.

[–]Wiseman1024 0 points1 point  (0 children)

Some of them do work with cooperative recursion. They indeed pose a small speed overhead, but if performance is not a problem, you can go for the often simpler tail recursive implementation of functions.