[erlang-questions] Updating Myths of Erlang Performance

Björn Gustavsson bjorn@REDACTED
Mon Jun 6 11:08:46 CEST 2016

On Sun, Jun 5, 2016 at 2:19 PM, Fred Hebert <mononcqc@REDACTED> wrote:
> One I persistently see, and which is likely a consequence of how we teach
> Erlang and set up exercises, is that tail recursion is always the best
> choice and likely faster than body recursion.
> In cases where all your function does is build a new list (or any other
> accumulator whose size is equivalent to the number of iterations and hence
> the stack) such as map/2 over nearly any data structure or say zip/2 over
> lists, body recursion may not only be simpler, but also faster and save
> memory over time.
> I had covered this in an old blog post at
> http://ferd.ca/erlang-s-tail-recursion-is-not-a-silver-bullet.html

Thanks! That shows this existing myth is still relevant:

Myth: Tail-Recursive Functions are Much Faster Than Recursive Functions

But I think that I can probably improve on the text based on your
feedback and blog post. Perhaps I should link to your blog post.


Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list