Fixed bug in uit64 benchmark.

This commit is contained in:
Davi de Castro Reis 2011-06-14 03:30:41 -03:00
parent 0846177267
commit 1a5eee170c

View File

@ -54,7 +54,8 @@ bool SearchUint64Benchmark::SetUp() {
if (!Uint64Benchmark::SetUp()) return false; if (!Uint64Benchmark::SetUp()) return false;
random_.resize(nsearches_); random_.resize(nsearches_);
for (int i = 0; i < nsearches_; ++i) { for (int i = 0; i < nsearches_; ++i) {
random_.push_back(values_[random() % values_.size()]); uint32_t pos = random() % values_.size();
random_[i] = values_[pos];
} }
return true; return true;
} }