Tue Dec 20 22:14:44 CET 2005
Ulf Wiger (AL/EAB) wrote:
>How well the different solutions stack up in this
>regard (the documented characteristics) varies:
>- gb_sets: excellent Complexity note with examples
>- gb_trees: well, it does say that it's logarithmic
>- lists: says nothing, but perhaps it doesn't need to?
>- sets: only says that the representation (and, I
> gather, also the complexity?) is undefined.
>- dict: same as for sets.
>- ets: briefly explains the characteristics of set
> and ordered_set
Sets and dict both use the same algorithm internally as ets. It is a
truly wonderful algorithm that I found but did not invent, though I wish
that I had. Both have relatively constant access times up to about
2-3000 elements and then they degrade gracefully. Or at least they should.
I personally thing that the dict interface is better and more consistent
than ets, but as I wrote it that is not surprising.
More information about the erlang-questions