Understanding Elixir/Phoenix performance

for elixir you’ll want to use Tail recursion… https://www.stridenyc.com/blog/tail-call-optimization-with-fibonacci-in-elixir

for golang you’ll actually want to use the iterative one (afaik): https://medium.com/@felipedutratine/iterative-vs-recursive-vs-tail-recursive-in-golang-c196ca5fd489

and now you end up comparing different algos - due to different language features and performance characterics etc. etc.

also see this post/video (probably somewhat outdated by now) Performance - Best practices? on how Elixir/Erlang trades throughput for predictable latency - and Go does the opposite…

3 Likes