A comparison of C, Go, and Erlang

, ,

A quote from the Go Programing Language Phrasebook

I had to write some code that would work on my single-core laptop and yet scale up to a 64-processor SGI machine. Doing this in C was very hard, but doing the same thing in Erlang was trivial. In Erlang, I wrote code that used over a thousand Erlang processes, and the runtime automatically distributed them across the available cores. The disadvantage of the Erlang version was that Erlang performs significantly worse than C in a single thread. Until you have a large number of available cores, the single-threaded C version will be faster than the concurrent Erlang version. Go combines the best of both worlds. In single-threaded performance, it is close to C, yet in encourages a programming style that scales well to large numbers of cores.