[erlang-questions] Updating Myths of Erlang Performance
Max Lapshin
max.lapshin@REDACTED
Sat Jun 4 08:32:41 CEST 2016
Maybe myth about speed of nif?
We in erlyvideo have tried many kind of nif functions and have removed most
of them. For example making mmap was one of the worsest ideas
On Sat, Jun 4, 2016 at 9:13 AM, Björn Gustavsson <bjorn@REDACTED> wrote:
> We think that it is time to update the Myths of Erlang Performance in
> the Efficiency Guide. Some myths have probably died by now and some
> new may have arisen.
>
> I am open to suggestions for myths to retire (move to a separate
> section at very end of the guide) and new myths to add.
>
> Currently, I think that the following myths definitely should be retired.
>
> 2.1 Myth: Funs are Slow
>
> 2.2 Myth: List Comprehensions are Slow
>
> Are any other myths dead?
>
> I am considering adding a new myth, something like this:
>
> "I thought binaries were always faster than lists, so why is binary
> matching slower than list matching?"
>
> Then there should be an example for both binaries and lists, something
> like this:
>
> f(<<B:/8,T/binary>>) ->
> %% Do something with B.
> f(T);
> f(<<>>) ->
> %% Return something.
>
> The answer should be that for more complicated binary patterns, binary
> matching wins, and also that the cost of using binaries vs. lists in
> the entire application must be considered. Long lists or many short
> lists in many processes will cost more in GC costs; then there are
> different costs for sending binaries vs. lists as messages.
>
>
> Are there any more myths I should consider?
>
> /Björn
>
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160604/bafd271d/attachment.htm>
More information about the erlang-questions
mailing list