Improve map performance by using hash tables