2. The Eight Myths of Erlang Performance
2 The Eight Myths of Erlang Performance
Some truths seem to live on well beyond their best-before date, perhaps because "information" spreads faster from person-to-person than a single release note that says, for example, that funs have become faster.
This section tries to kill the old truths (or semi-truths) that have become myths.
2.1 Myth: Funs are Slow
Funs used to be very slow, slower than apply/3
. Originally, funs were implemented using nothing more than compiler trickery, ordinary tuples, apply/3
, and a great deal of ingenuity.
But that is history. Funs was given its own data type in R6B and was further optimized in R7B. Now the cost for a fun call falls roughly between the cost for a call to a local function and apply/3
.
2.2 Myth: List Comprehensions are Slow
List comprehensions used to be im