[libcxx-commits] [libcxx] [libc++] Add more benchmarks for the associative container hint interfaces (PR #162840)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 10 09:23:20 PDT 2025
================
@@ -305,11 +305,19 @@ void associative_container_benchmarks(std::string container) {
// The insert(hint, ...) methods are only relevant for ordered containers, and we lack
// a good way to compute a hint for unordered ones.
if constexpr (is_ordered_container) {
- bench("insert(hint, value) (good hint)", [=](auto& st) {
+ auto insert_good_hint_bench = [=](bool bench_end_iter, auto& st) {
const std::size_t size = st.range(0);
std::vector<Value> in = make_value_types(generate_unique_keys(size + 1));
----------------
ldionne wrote:
We could consider returning a `std::set` from `make_value_types` instead, that would call out explicitly that the data is sorted and unique, and would make stuff like this easier. OK to do in a follow-up though.
https://github.com/llvm/llvm-project/pull/162840
More information about the libcxx-commits
mailing list