aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Brown <ezb@google.com>2024-03-26 14:20:28 -0700
committerCopybara-Service <copybara-worker@google.com>2024-03-26 14:21:21 -0700
commit1ccc2eb35ed685a5640cb80a26be4df535b9c7b9 (patch)
treeba7182b01fe349974d56433ad4317cebfa410725
parent6f0c500453dd911018bd5cfb46999cee5e3e2cf8 (diff)
downloadabseil-1ccc2eb35ed685a5640cb80a26be4df535b9c7b9.tar.gz
abseil-1ccc2eb35ed685a5640cb80a26be4df535b9c7b9.tar.bz2
abseil-1ccc2eb35ed685a5640cb80a26be4df535b9c7b9.zip
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
-rw-r--r--absl/container/internal/hash_policy_traits.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/container/internal/hash_policy_traits.h b/absl/container/internal/hash_policy_traits.h
index ec08794a..ad835d6f 100644
--- a/absl/container/internal/hash_policy_traits.h
+++ b/absl/container/internal/hash_policy_traits.h
@@ -168,7 +168,7 @@ struct hash_policy_traits : common_policy_traits<Policy> {
#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{}); }
private:
@@ -197,7 +197,7 @@ struct hash_policy_traits : common_policy_traits<Policy> {
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