I want to pass around a message as such
{up, Distance}
{down, Distance}
I could also do this as such
{1, Distance}
{-1, Distance}
The key difference is one is an atom and other an integer. Reading the man pages here:
http://www.erlang.org/doc/efficiency_guide/advanced.html
both an integer and atom take up 1 word in memory. However they mention an atom table and needing to reference it.
My question is, does the atom table get referenced each and every time an atom is used? Which of my examples is the most efficient?