Improve map performance by using hash tables
Lazily evaluate and cache expensive hashes
Cache less expensive hashes
Avoid unnecessary dynamic casting