3 ms·
I'm pretty sure erlangs :array is just a skin over tuple, so it's ~O(1) but not contiguous. might be O(log n) for dynamic arrays. The only truly array datatype
by throwawaymaths 3y ago
I'm pretty sure erlangs :array is just a skin over tuple, so it's ~O(1) but not contiguous. might be O(log n) for dynamic arrays. The only truly array datatype in Erlang is :atomics
- davydog187 3y agoErlang tuples are contiguous in memory for primitive values https://blog.edfine.io/blog/2016/06/28/erlang-data-representation/ https://blog.edfine.io/blog/2016/06/28/erlang-data-represent...
- throwawaymaths 3y agoArray doesn't guarantee to be put into a single tuple. It might be nested.