[erlang-questions] suitability of erlang

Jesper Louis Andersen <>
Mon Oct 15 10:45:51 CEST 2012

On Oct 10, 2012, at 8:37 AM, Rustom Mody <> wrote:

> Hello
> We are considering Erlang for a project involving significant data-processing under severe time-crunch
> I am trying to understand the sentence (from http://www.erlang.org/faq/introduction.html#id49576 )
> ----------
> The most common class of 'less suitable' problems is characterised by performance being a prime requirement and constant-factors having a large effect on performance.
> ----------
> How do I understand the '... and constant-factors…'

I think, but may be wrong, that it refers to the fact that Erlang is an interpreted language, which is also dynamically typed. There is no way you get such a language to have as low a constant factor for a computation in general as a solution baked up in C. A good example is if you want to do an FFT on some data. Since you have the interpreter overhead, there is no way to win here. At all. The constant factor on this piece of code is going to be higher.

But there are two things to be said about this: One, a typical program does not spend its time in a small kernel of computation anymore. It is way more complex and has a lot of interaction with the real world. And if there is a small kernel, you can implement the kernel in a different language and get away with it.

Two, I've found that a very large factor of performance stems from the ability to try out clever solutions and be clever about what you do. And in my experience, this is easier to achieve in sane, modern languages like ML, Erlang or (to a certain extent) Haskell. Thus, if you can trade a slow solution for a faster one quickly, then you end up with a faster program in the end. Another factor is time constraint, where a higher level language lets you express the problem quicker.

But Erlang does take some knowledge to make perform.

Jesper Louis Andersen
  Erlang Solutions Ltd., Copenhagen

More information about the erlang-questions mailing list