This commit is contained in:
Nicholas Orlowsky 2023-10-20 00:27:35 -04:00
parent f1868ceea5
commit dea773366e
No known key found for this signature in database
GPG key ID: BE7DF0188A405E2B
8 changed files with 103 additions and 24 deletions

View file

@ -17,6 +17,7 @@
#include <bits/stdc++.h>
constexpr int benchmark_loops = 100;
constexpr int SEED = 570;
template <typename KeyType, typename ValueType>
class smart_map {
@ -57,7 +58,7 @@ class smart_map {
void assess_datastructure() {
std::vector<std::pair<KeyType, ValueType>> vals(hmap.begin(), hmap.end());
std::shuffle(vals.begin(), vals.end(), std::default_random_engine(570));
std::shuffle(vals.begin(), vals.end(), std::default_random_engine(SEED));
use_hmap = assess_hmap(vals) > assess_vmap(vals);
}