4 ms·
There is no performance overhead, Elixir is equivalent to Erlang in that they both compile down to beam overhead.
by ryeguy 10y ago
There is no performance overhead, Elixir is equivalent to Erlang in that they both compile down to beam overhead.
- braveo 10y agoThis is the answer I was hoping I wouldn't get. I understand that it runs on BEAM, much like I understand that IronPython runs on the CLR. However, IronPython's performance is slower than C#'s performance due to the dynamic nature of the language, even with the special builtin support that MS built in. What I was asking is whether or not Elixir's performance characteristics were significantly different from Erlangs.
- dalailambda 10y agoThe semantics of Erlang and Elixir are very similar, as they're both dynamically typed functional languages, so the performance difference should be negligible.
- braveo 10y agoalright, thanks :)
- rvirding 10y agoThey are not only similar they are in fact the same. Elixir compiles down to Erlang and the Elixir libraries are built using Erlang and OTP "underneath". Also the the BEAM, the Erlang VM, is designed to run Erlang so it is difficult to make an efficient implementation of a language with different semantics on top of it. It is truly Erlang all the way down.
- dozzie 10y ago> I understand that it runs on BEAM, much like I understand that IronPython runs on the CLR. Those are different cases. Your question is more like "what is faster: C or Fortran?" than "what is faster: C or Python?". > However, IronPython's performance is slower than C#'s performance due to the dynamic nature of the language No. It's slower because IronPython is an interpreter, while C# compiles to byte code, not because one is statically typed and the other is dynamically typed.
- braveo 10y agohttps://en.wikipedia.org/wiki/Dynamic_Language_Runtime#Architecture https://en.wikipedia.org/wiki/Dynamic_Language_Runtime#Archi...
- dozzie 10y agoAnd what does it have to do with the fact that Python is interpreted by IronPython, which obviously slows down code execution?
- braveo 10y agothe DLR was specifically created to avoid that approach, IronPython, et al, haven't used such an approach since the DLR was released. It dynamically generates IL which is then JIT'd.
- rvirding 10y agoNo, they are the same, there is no basic difference at all.