Techempower benchmarks

You have to understand what you’re measuring. Here’s a screenshot of the same test, Fortunes, but only with JS and Elixir implementations. You’ll see Phoenix far behind a bunch of JS versions.

Now look to the very right of the picture. This column indicates the type of implementation. You can see the JS ones are “Micro” or “Platform”, while Phoenix is “Full”. You’re comparing a full framework realistic implementation with a bunch of stripped-down optimized versions.

No real optimization work has been done on that Phoenix implementation for years too, so there’s no doubt it could be made faster. Although with any change you’d have to think about whether you’re making the implementation less realistic, and then what’s the point? Do a stripped-down version with only Plug or something instead.

I’m not sure where the idea that releases are faster than running with mix comes from, but AFAIK there’s no additional optimization steps for releases, other than preloading modules (which doesn’t matter here since there’s a warmup). I’d be happy to learn otherwise though!

The documentation for mix releases has a good summary of the benefits of releases

https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-why-releases

4 Likes