Skip to content

Commit a3a126d

Browse files
committed
Remove size() benchmark since complexity is constant, not very interesting
1 parent 20de668 commit a3a126d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -433,22 +433,6 @@ void associative_container_benchmarks(std::string container) {
433433
}
434434
});
435435

436-
/////////////////////////
437-
// Capacity
438-
/////////////////////////
439-
bench("size()", [=](auto& st) {
440-
const std::size_t size = st.range(0);
441-
std::vector<Value> in = make_value_types(generate_unique_keys(size));
442-
Container c(in.begin(), in.end());
443-
444-
for (auto _ : st) {
445-
auto result = c.size();
446-
benchmark::DoNotOptimize(result);
447-
benchmark::DoNotOptimize(c);
448-
benchmark::ClobberMemory();
449-
}
450-
});
451-
452436
/////////////////////////
453437
// Query
454438
/////////////////////////

0 commit comments

Comments
 (0)