Sunday, March 23, 2008

Erlang processes benchmarked against threads of other languages

We all know that the result of benchmarks are only significant for that specific piece of code which is getting tested, and usually the benchmark authors favorite products are tuned to outperform its competitors. Nevertheless, below a summary of a benchmark recently discussed on reddit. The benchmark itself is just a few lines of source code (at least in Erlang), spawning a bunch of processes and doing some simple message passing between those processes. Thread implementations in other languages:
  • C (pthread - GNU gcc): 8.5 times slower
  • Python: 15 x slower, 1.4 x more memory
  • Java: 20 x slower, 5.8 x more memory
  • Ruby: 282 x slower, 3.4 x more memory
More numbers, details and the benchmark source code in all the different languages at the language shootout site.

1 comment:

Januar Simarmata said...

Nice... thanks for the info.