From my experiences, variables are actually faster than a hash table when storing a small value such as an integer.

However when storing and accessing large amounts of data, hash tables are better.