Split benchmark to generic and 2D
Speed optimization by using HashMap instead of Map, plus final