[erlang-questions] EUC presentation - Pure Erlang faster than Erlang/C?

Ulf Wiger ulf@REDACTED
Mon Dec 11 08:57:20 CET 2006


Den 2006-12-11 01:52:11 skrev Eduardo Figoli (INS) <eduardo@REDACTED>:

> Hi,
>
>
> I have read this year EUC presentation slides,
>
> Comparing C++ and Erlang for Motorola Telecoms Software.
> Henry Nyström, Erlang Training and Consulting, Sweden.
>
>
> My concern is about the comparison between Erlang and C,
> which results in Pure Erlang been faster than C++ and Erlang/C.
>
> Is this really true when dealing with soft real time systems
> (telco apps) ?

It is not universally true, but in a dispatch application,
it is pretty likely. Dispatch applications have lots of
concurrency and short messages, but little in terms of
number crunching or heavy text processing (esp if it deals
with "classical telco" binary coded messages.

The proportions can change if parts of the application
do stuff that erlang _doesn't_ to that well. For example,
routing applications usually employ some kind of Shortest-
path-first algorithm, and I think it's difficult to come
within a factor 30x of a textbook C implementation when
coding that in pure Erlang (at least that was the case
10 years ago - the gap may be a little bit smaller today).

In this case, the Erlang-C++ combo essentially reused the
existing Motorola libraries, which did several things that
the Erlang environment could to just as well or better.
In that case, reusing the C++ code is likely to result
in slowdowns.


> As I haven’t been in EUC’06 perhaps I’ve missed something
> more said during the conference, so I’d like to hear the
> Erlang community experience about this topic; any comments.

One thing that was mentioned was that the C++ code certainly
wasn't written for maximum performance, but rather for
resiliency (even though the Erlang version was much more
resilient). When large companies need to churn out C++ code
for resilient applications with predictable schedules, using
run-of-the-mill programmers, they tend to resort to rather
heavy-handed design rules.

BR,
Ulf W
-- 
Ulf Wiger



More information about the erlang-questions mailing list