3 ms·
> so we should not expect any meaningful performance gain from typing Elixir code but > The Erlang compiler already does so to improve performance within a si
by dmpk2k 4y ago
> so we should not expect any meaningful performance gain from typing Elixir code
but
> The Erlang compiler already does so to improve performance within a single module and we want to eventually do so across modules and applications too.
A bit confused by this. Will Elixir potentially embed types in BEAM files like Erlang increasingly does to inform the JIT, or not?
- mamp 4y agoI read it as even if extra type information was there the BEAM doesn’t use type information to optimise across modules.
- josevalim 4y agoThat's a very good question. We could potentially do it, yes, but we would have to carefully benchmark and the benefits would still be limited to single modules (no cross module optimizations at the moment). So overall it is safest to not expect any meaningful gains. You will likely gain more by writing idiomatic code with patterns and guards. :)