Dict vs. gb_trees
Mon Apr 25 14:50:30 CEST 2005
Joel Reymont wrote:
> Should I use dict or gb_trees? My understanding is that dict is a
> hash table whereas gb_trees are... trees. Is there a significant
> performance difference?
If you have simple keys (integers, atoms), and the tables are not
huge, the gb trees tend to be a bit faster and more lightweight,
so they are particularly good when you have lots of smaller tables.
If you have complex keys (strings, lists, big tuples, binaries,...),
you want to use dict because of the hashing. Apart from that, the
choice also depends a bit on the use pattern. However, I swapped
out my benchmarks from fresh memory a long time ago.
More information about the erlang-questions