removed yield calls from hashers and comparers

This commit is contained in:
joaquintides
2023-04-23 21:24:17 +02:00
parent 64f60542ac
commit cfd4829da5

View File

@@ -24,7 +24,7 @@ struct transp_hash
template <class T> std::size_t operator()(T const& t) const noexcept template <class T> std::size_t operator()(T const& t) const noexcept
{ {
std::this_thread::yield(); // std::this_thread::yield();
return boost::hash<T>()(t); return boost::hash<T>()(t);
} }
}; };
@@ -35,7 +35,7 @@ struct transp_key_equal
template <class T, class U> bool operator()(T const& lhs, U const& rhs) const template <class T, class U> bool operator()(T const& lhs, U const& rhs) const
{ {
std::this_thread::yield(); // std::this_thread::yield();
return lhs == rhs; return lhs == rhs;
} }
}; };
@@ -59,7 +59,7 @@ struct stateful_hash
{ {
std::size_t h = static_cast<std::size_t>(x_); std::size_t h = static_cast<std::size_t>(x_);
boost::hash_combine(h, t); boost::hash_combine(h, t);
std::this_thread::yield(); // std::this_thread::yield();
return h; return h;
} }
@@ -96,7 +96,7 @@ struct stateful_key_equal
template <class T, class U> bool operator()(T const& t, U const& u) const template <class T, class U> bool operator()(T const& t, U const& u) const
{ {
std::this_thread::yield(); // std::this_thread::yield();
return t == u; return t == u;
} }