Current I have a nested hashmap. The inner map key has a very large range but the outer map key has only 10 different possible strings.

```
unordered_map<string, unordered_map<int, list<string>>> nestedHashMap;

```

Would it be more efficient for me to switch to 

```
vector<unordered_map<int, list<string>>> 

```

and have my own hashfunction 

```
static int hashFunc(string stringToBeHashed){
        switch(stringToBeHashed){
            case "example1":
                return 0;
            .
            .
            .
            case "example10":
                return 9;
            default:
                return -1;
        }
    }

```

and do my own hashing before every look up? In terms of space complexity, due to the fact that the unordered\_map is a node based container, I think this vector approach would save me some per-node memory required by unordered\_map. Also, I am assuming the inner hashmap would guarantee fastest retrieval even though the key is an int. The key has a large range so I don't think using a vector here would increase performance. Right? Any comments/tips would be appreciated. 

Memory is not an issue here.