Yeah, I can confirm that running mix run vs elixir doesn’t appear to make a difference, at least enough that it’s measurable in this simplistic benchmark.
Here’s three runs each of elixir and mix run
➜ app mix run lib/nodep.exs < ../words.txt >/dev/null
22379157
➜ app mix run lib/nodep.exs < ../words.txt >/dev/null
24923662
➜ app mix run lib/nodep.exs < ../words.txt >/dev/null
22455488
➜ app elixir lib/nodep.exs < ../words.txt >/dev/null
22172380
➜ app elixir lib/nodep.exs < ../words.txt >/dev/null
22035877
➜ app elixir lib/nodep.exs < ../words.txt >/dev/null
22763843
The single outlier at 24s can pretty safely be ignored.
But again, none of this is a proper benchmark. All we’ve shown is that Elixir can be written to perform decently in a text processing script. The original article 2019 ruby 2.6 version took 37s, meaning we’re quite a lot faster than ruby at this point.






















