Hash table implementation based on affinity