1) Hashing is not O(1), it's at least O(k) where k=key.size(). 2) Maybe it's on average constant, but this constant is huge. Actually I can't find the case where it would be faster than plain old map. You can test it yourself, maybe I am wrong: https://gist.github.com/eXC...
1) Hashing is not O(1), it's at least O(k) where k=key.size(). 2) Maybe it's on average constant, but this constant is huge. Actually I can't find the case where it would be faster than plain old map. You can test it yourself, maybe I am wrong: https://gist.github.com/eXC...