Improve hmap performance