On 11/13/2012 11:53 PM, Paolo Carlini wrote:
To summarize my intuitions are (again, leaving out the final technicalities)

    a- std::hash specializations for scalar types -> no cache
b- std::hash specialization for for std::string (or maybe everything else, for simplicity) -> cache
    c- user defined functor -> cache or not basing on __is_noexcept_hash
Alternately, if we want to stress the consistency of our behavior, just a single rule: __is_noexcept_hash. That means I expect that b- above is normally penalized performance-wise, but we can document the behavior, the user can simply instantiate with a user defined hash functor which doesn't have noexcept on the call operator and just forwards to std::hash<std::string> and switch the container to caching.

Paolo.

Reply via email to