Commit 1ccc2eb3 by Evan Brown Committed by Copybara-Service

Enable small object optimization in swisstable.

See [implementation commit](https://github.com/abseil/abseil-cpp/commit/1449c9a106b090f61441ba245c781d7d2f89000c) for design details.

PiperOrigin-RevId: 619309882
Change-Id: I093c00365dda2268be86ba3d21421b6ffb59a5ce
parent 6f0c5004
...@@ -168,7 +168,7 @@ struct hash_policy_traits : common_policy_traits<Policy> { ...@@ -168,7 +168,7 @@ struct hash_policy_traits : common_policy_traits<Policy> {
#endif #endif
} }
// Whether small object optimization is enabled. False by default. // Whether small object optimization is enabled. True by default.
static constexpr bool soo_enabled() { return soo_enabled_impl(Rank1{}); } static constexpr bool soo_enabled() { return soo_enabled_impl(Rank1{}); }
private: private:
...@@ -197,7 +197,7 @@ struct hash_policy_traits : common_policy_traits<Policy> { ...@@ -197,7 +197,7 @@ struct hash_policy_traits : common_policy_traits<Policy> {
return P::soo_enabled(); return P::soo_enabled();
} }
static constexpr bool soo_enabled_impl(Rank0) { return false; } static constexpr bool soo_enabled_impl(Rank0) { return true; }
}; };
} // namespace container_internal } // namespace container_internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment