[erlang-questions] About Erlang system performance

Joe Armstrong erlang@REDACTED
Sat Nov 10 14:27:08 CET 2012

Performance depends upon the problem you want to solve.

If X is N times faster than Y for solving problem P it does not mean that
X is N times faster than Y for solving any other problem than P.

If P involves non-stop operation, code change on the fly, massive
parallelism, massive concurrency, good overload protection, soft real-time
garbage collection, ability to scale, faut-tolerance then Erlang is

Micro-benchmarks don't measure this kind of stuff.

Nobody implements, for example, the entire 3GPP standard for fun in
languages X and Y and compares the results - this would take thousands of
man years.

The only place where comparative benchmarking is done is where the
benchmarks are small and easy to write.

It's rather like chemistry, there is a reason why chemical plants don't have
200 ft high test tubes - lab experiments (done with test tubes) don't scale.

This is like software - micro benchmarks tell you little about
macro behavior.

If a web server behaves well for 1 user it does not mean it will behave
well for 100M users, unfortunately you can't easily do the experiment for
100M users.

Now there are good reasons for using Erlang and there are good reasons for
not using Erlang - it would do people a dis-service to suggest that Erlang
is good for
everything - which it is not.

Erlang was designed to be good at fault-tolerance, scalability, code-change
on-the fly
(these kind of things) - but there are no benchmarks that measure this.

How do you measure fault-tolerance? Write the system in 10 different
languages and run for five years and tell me the results - it's not going
to happen.

Rule of thumb: Type A - small memory intensive computations - local memory
- "maths" - use C.

Type B - Fault-tolerance, code change on the fly, scalable, non-stop
operation, massive concurrency, distribution, soft-real time response,
networking .. ues Erlang

Don't apply type A benchmarks to type B problems.

In type B there are no benchmarks - here the problem is usually getting the
stuff to work at-all - this is why benchmarks are skewed towards type A

Beging good at type A problems does not mean you will be good at type B

(The there is the hybrid approach - use Erlang to co-ordinate and
distribute type
A tasks)



On Fri, Nov 9, 2012 at 9:42 AM, hume npx <humeafo@REDACTED> wrote:

> Hi, all:
>   I'am new to erlang, after investigate some benchmark such as at
> http://shootout.alioth.debian.org/u64q/which-programs-are-fastest.php, I
> found that erlang compiler is not so good at speed? the benchmark shows
> that erlang Hipe is 13x slowdown compared to C++, as compared to Haskell
> GHC (3.3x slowdown), go 2.98x slowdown or even javascript v8 is about 1x
> faster than erlang, I investigated the erLLVM project which reported
> similar results to Hipe, you know performance is so important nowadays,
> what caused the hard to improve performace of erlang or just there are not
> people working on it? Erlang is attractive to me after several days
> studying, but with great performance will be more attractive and
> competitive to some languages such as go etc.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121110/88e9c1e5/attachment.htm>

More information about the erlang-questions mailing list