[erlang-questions] Introspecting the atom table

Yariv Sadan <>
Thu Dec 21 04:22:23 CET 2006


I originally thought about using a dict (O(1)) instead of a gb_trees,
but I read that gb_trees can be faster for a small number of keys, so
I went with gb_trees. I guess I should do some benchmarking to see
which is fastest for a typical ErlyWeb app: gb_trees, dict or
list_to_existing_atom(),

Ugh, running benchmarks is sooo boring... :)

Yariv

> gb_trees is O(log(n)) and atom things are O(1) (atom table seems to be
> a hash), and list_to_existing_atom seems to be a BIF. I would be
> surprised if list_to_existing_atom() didn't win in a performance
> test.
>
> Jani Hakala
>



More information about the erlang-questions mailing list