improve hash string performance