3 ms·
Is there a performance difference between Elixir and Erlang? I assume not since they both run on BEAM but I've never dabbled with Elixir.
by karl_schlagenfu 7y ago
Is there a performance difference between Elixir and Erlang? I assume not since they both run on BEAM but I've never dabbled with Elixir.
- degraafc 7y agoElixir compiles down to the same Erlang Abstract Format as Erlang itself, so performance should be the same.
- gervu 7y agoBetween Elixir and Erlang, there's no difference because it's all BEAM bytecode when it runs. Between arbitrary individual functions you might encounter, there can be differences, but only in the sense that it could happen between Erlang and Erlang if the functions had different implementations or degrees of optimization or optimization choices. Worth noting for prospective adopters is that you can seamlessly call Erlang functions from Elixir by adding a : prefix, such as :random.uniform(), and there's no weird overhead or surprises involved.
- nivertech 7y agothere are might be some minor overhead for Elixir: - all uppercase elixir atoms / module names adding "Elixir." prefix - idiomatic Elixir code uses structs (sugar over maps), where Erlang uses records (sugar over tuples) - some other idiomatic Elixir code has overhead over Erlang, for example access operator []