[erlang-questions] Introspecting the atom table

Jani Hakala <>
Thu Dec 21 03:34:07 CET 2006

"Yariv Sadan" <> writes:

> Instead of converting
> controller/function names of incoming requests to atoms, ErlyWeb looks
> them up in the gb_trees structure for the application. This is how
> ErlyWeb avoids allocating atoms for incoming requests.
> I hope this approach has similar performance to checking the existence
> of atoms. Does anybody think the latter is better?
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

Jani Hakala

More information about the erlang-questions mailing list