[erlang-questions] Erlang and Akka

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Fri Aug 29 13:05:19 CEST 2014

On Fri, Aug 29, 2014 at 5:40 AM, Xiao Jia <me@REDACTED> wrote:

> What is the underlying issue?  I always thought interpreted languages
> cannot achieve good cache efficiency so they are doomed to be much slower
> given that the same algorithms and data structures are used.

The underlying issue is hidden cost. That "smart pointer" thing you are
running? It is the equivalent of a weak reference counting model which is
easily beaten by a well-tuned garbage collector. Another is building
abstraction upon abstraction in an effort to being able to conceptualize
what is going on. A Scheme system already conceptualized these things and
internalized them in optimized form. Also, some scheme interpreters are
extremely efficient due to years of tuning. And yet another problem is that
once you add the necessary error handling and robustness to the
implementation, its peak performance suffers.

Finally, and what most often makes the difference, is that given the same
amount of development time, the Scheme programmer will be able to pick
better data structures, better algorithms and have a faster iteration. This
in turn leads to much more experimentation in the same time-frame and thus
better implementations. In many benchmarks, the implementation time isn't
fixed which means that you are free to spend 20 times more on building the
perfect C++ program.

My experience is the same. I wrote BitTorrent clients in Erlang and
Haskell. They were more efficient and faster than C/C++/Java counterparts
by virtue of better algorithm design, smaller code base and better data
structure choices.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140829/514693d5/attachment.htm>

More information about the erlang-questions mailing list