[erlang-questions] Updating Myths of Erlang Performance

Björn Gustavsson bjorn@REDACTED
Mon Jun 6 11:04:17 CEST 2016


On Sat, Jun 4, 2016 at 11:43 AM, Joe Armstrong <erlang@REDACTED> wrote:
> 1) That using cases/if/multiple entry points is somehow more efficient
>
> I've see several posts suggesting that rewriting functions with a
> single entry point
> conta multiple entry points and so on will be magically more efficient
> - when in fact
> after compilation the code is pretty much identical.
>

Good suggestion. I think I will incorporate that into the existing myth:

Myth: Use "_" to Speed Up Your Program When a Variable is Not Used

That would describe the more general myth that trivial transformations
of your source code would make it more efficient.

> 2) That you can predict performance without doing measurements.
> A simple guide to measuring performance might be good here.

I have tried to make the myths Erlang-specific. Also, in the
introduction to the Efficiency Guide there is the advice to profile
the code before optimising:

http://erlang.org/doc/efficiency_guide/introduction.html

> 5) That string processing is inefficient (there are even Blog and rants about
> Erlangs "string problem" - please tell people to avoid tail-appending
> long lists A ++ LongList is a killer when I/O lists are perfect.
>
> 6) That Erlang has a string problem - no it doesn't - Erlang has no strings.
> It has string literals and lists of integers - and libraries to
> serialise lists of
> integers into UTF8 byte streams and so on.

There already is the myth:

Myth: Strings are Slow

But I can probably improve the text based on your suggestion.

Thanks for the suggestions.

/Björn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list