3 ms·
This was a great article on this sort of thing http://cloudless.studio/articles/12-elixir-vs-ruby-file-i-o-performance-updated http://cloudless.studio/articles/
by rozap 10y ago
This was a great article on this sort of thing http://cloudless.studio/articles/12-elixir-vs-ruby-file-i-o-performance-updated http://cloudless.studio/articles/12-elixir-vs-ruby-file-i-o-...
Tl;dr: Elixir is a bit faster than Ruby for straight up File IO if you really know what you're doing. Naive approaches in Elixir can lead to terrible performance.
I'm a huge fan of Elixir, but eeking out better performance can require some tricks that aren't intuitive if you're new to the language.
From personal experience (we're using Elixir at work) and we compared parsing a CSV in Elixir vs Scala, and the Elixir version was about 20% slower. However, for our use cases, we can more than make up for it by parellelizing processing downstream, ie: the csv parsing wasn't going to be the bottleneck anyway - other things, (which are easily parallelizable if you're running on BEAM) are the bottleneck, so BEAM gives us some nice things the JVM doesn't.