[erlang-questions] How to Update List Elements A Lot
Tue Jul 21 06:00:04 CEST 2015
I'm writing an encrypt/decrypt stuff in Erlang, the input and output are
both lists (or binary). In other words, I need to generate a list of bytes
based on another list of bytes. During the generating there are a lot of
band, bor, bxor, bsl, bsr, etc operations. Every element in the new list
(the output) would be updated many times.
In other language, like C or Python, we can init an output list and then
update its elements inline. In Erlang, what I currently do, would make a
copy of the list every time when an element need to update. This looks not
Any comments/ideas on this? I want to use pure Erlang to implement it,
rather than making a C port.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions