how to interpret these results ?

Ulf Wiger ulf@REDACTED
Thu Jul 20 23:40:54 CEST 2006


Den 2006-07-20 17:46:32 skrev Only OpenSource <onlyopensource@REDACTED>:

> Hello
>
> Here is a comparison of Erlang and C
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=hipe&lang2=gcc
>
> What is the recommended approach towards understanding the benchmark  
> numbers ?
> For starter's do they even make any sense at all ?
>
> All observations and suggestions for a newbie will be greatly  
> appreciated !

The thing to keep in mind is that performance in micro benchmarks
like these say little about the performance in a more complex
system. In real applications, Erlang tends to offer much better
performance than these benchmarks seem to indicate. The only
way to find out what's valid for your particular applications
is to prototype and measure.

Having said this, the benchmarks do  indicate that for raw,
low-level processing, C tends to leave Erlang in the dust.

A worthwhile strategy can be to prototype the application
in Erlang, then measure and identify bottlenecks. In some
cases, rewriting a small part of the program in C can have
a great impact on performance.

An interesting point in this particular comparison is the
concurrency benchmark. It shows that using Erlang for
concurrency is far better than using C and stock Linux
processes or threads. Not only is it much faster and more
scalable - it is also far easier to program.

A fairly common newbie mistake is to underestimate the
amount of natural concurrency inherent in a typical
application. Since most programming languages are pitifully
bad at modeling concurrency, we get used to hiding the
concurrency rather than emphasizing it as one of our most
fundamental modeling techniques.

BR,
Ulf W
-- 
Ulf Wiger



More information about the erlang-questions mailing list