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

Jan Henry Nystrom jan@REDACTED
Mon Dec 11 12:15:02 CET 2006

Hi Eduardo and Ulf,

I did not know I wrote under the pseudonym of Ulf Wiger :-)

On a more serious note, Ulf has captured the reasons for the
Erlang version being faster than the C++ version excellently
and I agree whole heartedly with his analysis.

The only thing I would like to add is that the  Erlang/C
version labored under the burden of an extra layer of
communication between the Erlang and the C libraries, thus
it ends up holding the wooden spoon.

/Cheers Henry

P.S. Third try, problem with email address so apologize if
more than one copy reaches you.

Ulf Wiger wrote:
> 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

More information about the erlang-questions mailing list