3 ms·
It is immutable and persistent, but not with the same performance characteristics. It lacks Bagwell's data structures that allow structural sharing. Take a 10 m
by retrogradeorbit 9y ago
It is immutable and persistent, but not with the same performance characteristics. It lacks Bagwell's data structures that allow structural sharing. Take a 10 million item list in elixir and 'change' (return a new) the 5 millionth element. Time how long it takes. Do the same with clojure. Compare.
- ramchip 9y agoThat was true a few years ago, but not anymore: https://medium.com/@jlouis666/breaking-erlang-maps-1-31952b8729e6 https://medium.com/@jlouis666/breaking-erlang-maps-1-31952b8... (You would have to use a map though, the native lists are still plain old lists)