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

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CABgUW%2BQiD_Q8bKbe8hV5Q6Lh3PbgVxthOf7zRMASA4qiwqmbrA%40mail.gmail.com.

Reply via email to