4 ms·
> I don't know Scala or Erlang, but based on the results I would assume both are allocating a posix thread for each thread No. Erlang is only ~five times slowe
by dozzie 11y ago
> I don't know Scala or Erlang, but based on the results I would assume both are allocating a posix thread for each thread
No. Erlang is only ~five times slower than Go, according to the benchmark
run, which is a marvellous result given the Erlang's VM is slow as hell, even
with HiPE. Scala/Akka is slower by thirty times under this workload.
> But a program can be refactored in all the languages to have a smaller number of workers and a queue of work to be consumed. This would be faster than the Go version, but require more code and complexity.
Oh, I bet it wouldn't be faster, but it surely would add tons of complexity.
Erlang was specifically designed for programmer to spawn a thread for each
activity. New client connected? Spawn. Need a background computation? Spawn.
Need a connection to external entity? Spawn. Need to do cleanup (reliably)
after this computation terminates? Spawn. Go shares this approach to some
extent.
- deleted 11y ago[deleted]