performance: optimize varchar key compare