File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -58,18 +58,20 @@ void resume_timing()
5858#include < random>
5959#include < vector>
6060
61- static std::vector<boost::uint64_t > data,unsuccessful_data;
61+ static std::vector<boost::uint64_t > data,unsuccessful_data,mixed_data ;
6262
6363static inline void initialize_data (unsigned int n)
6464{
6565 std::uniform_int_distribution<boost::uint64_t > dist;
66+ std::bernoulli_distribution b (0.5 );
6667 std::mt19937_64 gen (34862 );
6768
6869 data.clear ();
6970 unsuccessful_data.clear ();
7071 for (unsigned int i=0 ;i<n;++i){
7172 data.push_back (dist (gen));
7273 unsuccessful_data.push_back (dist (gen));
74+ mixed_data.push_back (b (gen)?data.back ():unsuccessful_data.back ());
7375 }
7476}
7577
@@ -182,8 +184,8 @@ int main()
182184 container_t4,
183185 container_t5>
184186 (
185- " Scattered successful lookup" ,
186- data ,
187+ " Scattered mixed lookup" ,
188+ mixed_data ,
187189 " absl::flat_hash_map" ,
188190 " indivi::flat_wmap" ,
189191 " boost::unordered_map" ,
You can’t perform that action at this time.
0 commit comments