[erlang-questions] Store maps in ets/dets?
Thu Apr 10 18:14:05 CEST 2014
On Thu, Apr 10, 2014 at 2:09 AM, Jesper Louis Andersen
> The semantics of maps is that of a persistent data type. ETS is ephemeral.
> So the fit is not good. Furthermore, maps are living int he process heap and
> thus, they are automatically garbage collected. ETS is manually collected in
> contrast. So the fit is even worse.
I think you might mean the opposite here....that maps is ephemeral and
ETS is persistent (or can be persistent using DETS anyway)
> Maps currently has no order (based on maps:map/2 and maps:fold/3), which
> means they can be implemented as HAMTs (like in Clojure) once they grow
> large. This has very good runtime behaviour, while keeping the process
> semantics intact. The other option is to give maps order, but then we can't
> use digital searching techniques anymore and must resort to balanced search
> trees, e.g., AVL or RB trees and friends.
> The current representation is very memory efficient however. It will
> probably be very good for small maps with a keyset that doesn't change.
> On Thu, Apr 10, 2014 at 10:41 AM, Max Lapshin <> wrote:
>> Maybe I have missed something and failed to google this info, but are
>> there any plans to store maps in ets?
>> erlang-questions mailing list
> erlang-questions mailing list
"Genius might be described as a supreme capacity for getting its possessors
into trouble of all kinds."
-- Samuel Butler
More information about the erlang-questions