4 ms·
When dealing with high concurrency, Erlang will beat C.
by erlanger 17y ago
When dealing with high concurrency, Erlang will beat C.
- davidw 17y agoWhat is Erlang written in, again? Erlang makes it (a lot) easier to write high concurrency code, if that's how you define 'beat', but it's not "faster".
- erlanger 17y agoYes, you could theoretically struggle to write C code to work like Erlang, but processes are very cheap in Erlang, and distributed, parallel code is extremely easy to write. C performs well, but can be unstable; Yaws performs as well as Nginx. Erlang's greatest advantage is not in its vertical but its horizontal scalability, which does have consequences for performance.
- neilc 17y agoyou could theoretically struggle to write C code to work like Erlang Lots of people write non-blocking network servers in C (epoll, kqueue, etc -- libevent); that does not constitute "struggling to write C code that works like Erlang", but it still delivers a very high-performance end result. C performs well, but can be unstable C is perfectly "stable", it can just be hard to get right.
- davidw 17y agoWhere Erlang is really strong is that you can handle fairly long running processes that won't block other stuff that's happening. Of course you can find ways to do that in C, but it's just easier and way cleaner in Erlang. This works because of Erlang's internal scheduler.