I would like to know whether
std::unordered_map< int, float >
std::hash<int>
I would like to know whether
std::unordered_map< int, float >
still has to hash the given integer
Yes it does.
I need to perform this operation very fast many times
Did you complete your project and witnessed that this is the bottleneck of it? If not, then watch out, since you might end up as a victim of premature optimization!
how would I go about redefining it?
You have to write your own code then. Example: C++ unordered_map using a custom class type as the key, where you would use struct Key { int value; };
.