小编Igo*_*gor的帖子

std::unordered_set::find 和 std::find 之间奇怪的性能差异

我尝试比较std::unordered_set::find和 的性能std::find。与我的期望和规则相反https://clang.llvm.org/extra/clang-tidy/checks/performance-inefficient-algorithm.html std::find明显更快

带有 unordered_set 的快速工作台

快速工作台屏幕

unorder_setcontains ints 所以哈希应该不是问题。std::set::find行为符合预期并且比std::find.

带套装的快速工作台 谁能解释一下这种行为?谢谢

c++ performance

6
推荐指数
1
解决办法
155
查看次数

标签 统计

c++ ×1

performance ×1