开发者

What bit hash function does unordered_map use?

What bit hash does unordered_map of C++0x use by default? std::hash function 开发者_开发问答returns size_t. Does that mean unordered_map uses a 16 bit hash function?


std::unordered_set uses std::hash by default.

If std::size_t is 16-bit for you, then I guess it does use a 16-bit hash. On a 16-bit machine, I'd expect unordered_map::max_size() to be low enough that using such a weak hash wouldn't be a problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜