[benchmark-set] Remove use of rand() inside benchmark
This commit is contained in:
parent
efa2a5796e
commit
ce5435a862
|
@ -35,7 +35,7 @@ static void BM_SetInsert_1000(benchmark::State& state) {
|
||||||
for (auto _ : state) {
|
for (auto _ : state) {
|
||||||
hb_set_t* data = hb_set_copy(original);
|
hb_set_t* data = hb_set_copy(original);
|
||||||
for (int i = 0; i < 1000; i++) {
|
for (int i = 0; i < 1000; i++) {
|
||||||
hb_set_add(data, rand() % max_value);
|
hb_set_add(data, i * 2654435761u % max_value);
|
||||||
}
|
}
|
||||||
hb_set_destroy(data);
|
hb_set_destroy(data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue