尾递归优化

Elixir 对于尾递归的介绍

超赞的文章: Tail Call Optimization in Elixir & Erlang – not as efficient and important as you probably think (链接备份)

don’t assume – always proof.

2 The Eight Myths of Erlang Performance - 2.3 Myth: Tail-Recursive Functions are Much Faster Than Recursive Functions

So, the choice is now mostly a matter of taste. If you really do need the utmost speed, you must measure. You can no longer be sure that the tail-recursive list function always is the fastest.

关于这篇文章的讨论: https://elixirforum.com/t/tail-call-optimization-in-elixir-erlang-not-as-efficient-and-important-as-you-probably-think/880 (链接备份)