Fix mismatch between size_t and uint64_t in std::set benchmark.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -83,12 +83,12 @@ struct Create : Base {
|
||||
using Base::Base;
|
||||
|
||||
void run(benchmark::State& State) const {
|
||||
std::vector<size_t> Keys(TableSize);
|
||||
std::iota(Keys.begin(), Keys.end(), size_t{0});
|
||||
std::vector<uint64_t> Keys(TableSize);
|
||||
std::iota(Keys.begin(), Keys.end(), uint64_t{0});
|
||||
sortKeysBy(Keys, Access());
|
||||
|
||||
while (State.KeepRunningBatch(TableSize * NumTables)) {
|
||||
std::vector<std::set<size_t>> Sets(NumTables);
|
||||
std::vector<std::set<uint64_t>> Sets(NumTables);
|
||||
for (auto K : Keys) {
|
||||
for (auto& Set : Sets) {
|
||||
benchmark::DoNotOptimize(Set.insert(K));
|
||||
|
||||
Reference in New Issue
Block a user