hash: cache variable lookups