3 ms·
There are plenty of other benchmarks where Ruby on YARV and Elixir on BEAM are roughly even. In this example, JRuby is ~2x faster than Elixir + BEAM. https://g
by jashmatthews 8y ago
There are plenty of other benchmarks where Ruby on YARV and Elixir on BEAM are roughly even. In this example, JRuby is ~2x faster than Elixir + BEAM.
https://gist.github.com/jamatthews/7b41b5ce5058f3f4ed674b6ac6ee0e0d https://gist.github.com/jamatthews/7b41b5ce5058f3f4ed674b6ac...
- pdimitar 8y agoAs for CRuby and JRuby, they are completely different runtimes. Not sure they belong in a comparison. Elixir only has one runtime, let's compare with the defaults. Additionally, why do you use the scripting mode of Elixir (.exs file extension)? Why not compile it (.ex file) and run it? The scripting mode hampers performance. Can you update the gist with a compiled version? And finally, comparing raw performance isn't really what we argued about here (at least I wasn't). I thought we talked about I/O and concurrency capped environments which are the conditions in which the usual web / API app lives. Erlang/Elixir shine on a lot of things. But definitely not on raw crunching power -- that much is true and the Elixir community is realistic about it.
- jashmatthews 8y agoI actually even tried compiling the module with HiPE but it made almost no difference so I didn't update the Gist. I've updated it to reflect the tiny improvement it made. In terms of web, CRuby 1.9+ simply uses OS threads for concurrency and parallel IO. You will run out of CPU resources before "the runtime won't scale" on modern Ruby.