

Ask HN: What are the reason behind the erlang vm performance? - siscia

I always hear about the performance of the erlang vm regarding concurrent connection, I am wonder what bring such performance.<p>Also, it will be possible to implement&#x2F;obtain the same level of performance in a system language using a library or it would be necessary to write&#x2F;patch a compiler ?
======
viraptor
If you can manage your memory completely, then yes, you could obtain the same
performance by applying some restrictions.

There are some cool things erlang vm does:

\- immutable values (so you don't have to worry about sharing and copying)

\- per process heaps (so you don't have to worry about big stops on gc)

\- adjustable heap pre-allocation (so you don't have to resize heaps once you
know how much memory your processes need)

I don't think that depends on the compiler really. You couldn't patch python
for example to do the same for you automatically. It's in the language
limitations.

~~~
fenollp
> manage your memory

BEAM has a load of different memory allocators. Reading this [0] gives an idea
of the piece of work the BEAM vm is.

[0]: [http://www.erlang-
factory.com/static/upload/media/1394545171...](http://www.erlang-
factory.com/static/upload/media/139454517145429lukaslarsson.pdf)

