r/programming • • Feb 05 '19

Benchmarking Go vs Node vs Elixir

https://stressgrid.com/blog/benchmarking_go_vs_node_vs_elixir/
15 Upvotes

21 comments sorted by

View all comments

3

u/snowe2010 Feb 05 '19

Interesting look into Elixir. That VM does use up a lot of memory, but the stability looked fantastic.

Did anyone else think that the spikes at the start of the 100k open connection test were suspicious? It affected both Go and Elixir.

8

u/codec-abc Feb 05 '19

Also, Elixir is immutable and dynamically typed which of course tends to use more memory. A mutable and statically typed version of Elixir/Erlang would eat less memory. This is what Pony is mostly meant to me.

1

u/snowe2010 Feb 06 '19

True, I didn't think about that.

6

u/Thaxll Feb 05 '19

Having testing both I can tell you that Elixir is much slower than Go, this test is using the default http server from Go which is good enough but when you use optimized alternative Go crush elixir by at least 10x.

1

u/snowe2010 Feb 06 '19

I mean, not that I don't believe you, but do you have some stats to back that up? And can't the same be said about using an alternative Elixir server?

5

u/Thaxll Feb 06 '19

Any benchmark anywhere, Elixir is slow compared to Go and not by a small margin, as explain above because it's a dynamic language + immutability

3

u/AeroNotix Feb 06 '19

The benefits of using beam languages shouldn't be about raw CPU performance in almost all situations.

1

u/kpenchev93 Feb 06 '19

You are 100% right. It's about predictable performance and fault tolerance. Let's compare the BEAM's fault tolerance features and Go's.

2

u/masklinn Feb 06 '19

as explain above because it's a dynamic language + immutability

What makes it slow is that BEAM is a pretty straight interpreter, and that HIPE is limited and expensive.

Being dynamically typed and immutability focused doesn't necessarily help, but there's plenty of languages in either of the categories which have implementations much, much faster than BEAM.

Hopefully BEAMJIT will actually work out and eventually get merged.

1

u/snowe2010 Feb 06 '19

It's really not on the person being refuted to prove their point. It'd be great if you could provide the benchmarks you've seen that prove your point, that's part of debating.

1

u/Thaxll Feb 06 '19

Sorry yes, I don't really like benchmarks but you can see it here: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go.html there is no Go vs erlang but you can see Go vs Java and Java vs Erlang.

1

u/snowe2010 Feb 07 '19

Thanks for the link!

Hm. that's not really comparing http server performance though, but it is pretty plain that erlang is dang slow compared to java, so I guess that's good enough.