I was searching about process model of Erlang over internet and found out some graphs slides 3-4 in one of the talk given by Joe Armstrong. They shows a lot of difference between process creation and message passing time between Erlang , java and C#. Can anybody tell me the reason behind such big difference?
views:
144answers:
2Erlang processes are very light weight. An implementation does not even need to allocate an OS thread to an Erlang process. This has to do with the functional nature of Erlang.
In Erlang, processes are not real processes. They are light structures handled by the language. Message passing is also handled by the language, using shared memory when possible.
In the other hand, other languages are using real threads / processes since they don't have built-in light structures like this. Therefore, these structure are a bit heavier, are using thread primitives to communicate (slower).
I don't know about your graph, but I guess it shows that Erlang's processes are better. It's done comparing things that are inherently different, however it show that Erlang rocks to model standalone objects communicating using messages (things you cannot really do in other languages).