📜 ⬆️ ⬇️

What is this fuss about Erlang?

by Joe Armstrong

No one is able to predict the future - but I will make some reasonable assumptions.

Suppose that Intel is right that their project Keifer will shoot. If this happens, then 32 nuclear processors will appear on the market no later than 2009-2010.
')
There is nothing surprising here. Sun is already selling eight-core Niagara with 4 “hyperthreads” on each core, which is equivalent to 32 cores.

This is a development that will make happy Erlang programmers. They have been waiting for this event for 20 years, and now the time has come to pay.

Good news for Erlang programmers:

On an N-core processor, your program will run N times faster.



Is this true?

Nearly. So far it is still too early to talk about it, but we are optimistic (wildly optimistic - I have not seen such optimism in the last 20 years!) .

In some cases, you will have to tweak your code a bit - when I ran my Erlang documentation generation program on Sun Niagara (equivalent to a 32 core processor) , the changes affected only one line of code (changed map to pmap - I apologize for those details pmap is just a "parallel map") .

The program (which generated 63 documents from the wiki markup) began to work 7 times faster. Not 32 times, of course - but, I assure you, much faster (later it turned out that the disk I / O was a bottleneck, and since it was not parallelized, we rested on a sevenfold increase :) .

In Ericsson, where I worked, and where Erlang was developed, we port some applications to 4-core processors - and you know what? After a light finish, they work almost 4 times faster. We already have not enough patience to wait for the 80-core stones with which Intel is played in laboratories ...

So why do our programs run faster with such simplicity? It's all about changeable state and parallelism.

Variables and concurrency


C ancient times (wild 20 years ago) there are two models of parallelism:

Source: https://habr.com/ru/post/31546/


All Articles