News for hackers. Stuff that matters.
Re:Lovely Week with Elixir by danielscrubs on Wednesday May 20, 2020 @03:32PM (#23250785)
I have assumed BEAM has similar latency to Go and is garbage collected?

Here is some benchmarks where Erlang beats Go in throughput:

https://timyang.net/programming/c-erlang-java-performance/ https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixi...

Re:Lovely Week with Elixir by Scramblejams on Wednesday May 20, 2020 @06:53PM (#23252953)
That first link is from 2009. A lot's changed since then, so I didn't read it.

And maybe I missed something in the second link, but Go showed very similar I/O performance to Elixir, while consuming a boatload less CPU doing it. That's what I'm after. Open to being told I missed something, though.

Re:Lovely Week with Elixir by adelarsq on Thursday May 21, 2020 @12:03AM (#23254674)
> Open to being told I missed something, though.

The Bean keep using CPU even with no work to be done, so avoid context changes. We can't compare about CPU values.

Re:Lovely Week with Elixir by Scramblejams on Thursday May 21, 2020 @03:33AM (#23255763)
We can't compare about CPU values

Can you explain more why we can't compare? Looking at this chart...

https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixi...

...shows pretty clearly how the CPU utilization grows linearly (ignoring some sawtooth) as the load increases, plateaus once the load remains constant, and then comes down linearly as the load decreases on the other end. Looks like a very clear mapping between work done and CPU load to me.

Re:Lovely Week with Elixir by Zingler on Thursday May 28, 2020 @01:55PM (#23340270)
It is explained in the blog post after that benchmark - https://stressgrid.com/blog/beam_cpu_usage/ .

Essentially in order to optimise responsiveness the BEAM uses busy waiting, which in reality is not actually utilising the CPU as much as is reported by the OS, which results in misleading CPU usage being reported by the operating system.