Hi,
Elixir applications, due to immutability principle, create a copy of a data structure once that structure is modified (transformed) and if the structure's new value is to be kept via assignment to a variable. Hence, for example, when a Map is visited and some its members are modified , for each modification a copy of the whole Map is created. I understand that creating a new variable is as simple as bumping up a pointer in memory, however, the whole Map is copied over and over again while it's being modified in the application. In other languages without the immutability principle, only the changed portion of the Map would be allocated in memory during a similar operation.
In such a situation where there's this copying overhead in almost all data operations in an Elixir program, I would expect the system would run much slower compared to other languages. Yet, I've not seen mention of this problem anywhere on the web. So, probably, I'm missing something. Anyone please would care to comment on this ?
Regards,
Bülent Erdemir