Why does Erlang process creation and messaging take less time than Java and C#

I searched Erlang's process model on the Internet and found some chart slides 3-4 in a speech by Joe Armstrong They show many differences in process creation and message passing time between Erlang, Java and C # Who can tell me the reason behind such a big difference?

Solution

In Erlang, a process is not a real process They are lightweight structures processed by language Messaging is also handled by language, using shared memory as much as possible

On the other hand, other languages are using real threads / processes because they don't have built-in optical structures like this Therefore, these structures are a bit heavy and communicate using thread primitives (slower)

I don't know your chart, but I think it shows that Erlang's process is better It has done a comparison of essentially different things, but it shows that Erlang rock simulates independent objects communicating using messages (things you can't do in other languages)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>