Optimize table lookups