#include #include #include "./src/includes/aggregate_tests.h" // // we can use to switch the map implementations to that // // we can add some cli handling so we can specify which maps to tests (or all) // typedef std::unordered_map intmap; // typedef std::unordered_map stringmap; // // // google sparse // typedef google::sparse_hash_map intmap; // typedef google::sparse_hash_map stringmap; // // // google dense // typedef google::dense_hash_map intmap; // typedef google::dense_hash_map stringmap; // // // abseil nodehashmap typedef absl::node_hash_map intmap; typedef absl::node_hash_map stringmap; // // // flat hashmap // typedef absl::flat_hash_map intmap; // typedef absl::flat_hash_map stringmap; // // // tessil flat hashmap // typedef tsl::sparse_map intmap; // typedef tsl::sparse_map stringmap; // // // Tessil tsl::array_map // typedef tsl::array_map intmap; // typedef tsl::array_map stringmap; // // // Tessil tsl::ordered_map // typedef tsl::ordered_map intmap; // typedef tsl::ordered_map stringmap; // // // Tessil tsl::robin_map // typedef tsl::robin_map intmap; // typedef tsl::robin_map stringmap; // // // Tessil hopscotch_map // typedef tsl::hopscotch_map intmap; // typedef tsl::hopscotch_map stringmap; // // // Boost::unordered_map // typedef boost::unordered_map intmap; // typedef boost::unordered_map stringmap; // // // skarupke's unordered map // typedef ska::unordered_map intmap; // typedef ska::unordered_map stringmap; // // // skarupke's bytell hash map // typedef ska::bytell_hash_map intmap; // typedef ska::bytell_hash_map stringmap; // // // skarupke's flat hash map // typedef ska::flat_hash_map intmap; // typedef ska::flat_hash_map stringmap; // // // greg7mdp's flat hash map // typedef phmap::parallel_flat_hash_map intmap; // typedef phmap::parallel_flat_hash_map stringmap; // // // greg7mdp's hash map // typedef phmap::parallel_node_hash_map intmap; // typedef phmap::parallel_node_hash_map stringmap; // // emilib's hash map // typedef emilib::HashMap intmap; // typedef emilib::HashMap stringmap; // // martin flat map // typedef robin_hood::unordered_flat_map intmap; // typedef robin_hood::unordered_flat_map stringmap; // // martin flat map // typedef robin_hood::unordered_node_map intmap; // typedef robin_hood::unordered_node_map stringmap; int main() { time_point start_test = steady_clock::now(); // string_test(stringmap{}, 1); // process gets killed for sizes >35000 int_test_aggregate(intmap{}, 2); string_test_aggregate(stringmap{}, 2); time_point end_test = steady_clock::now(); std::cout << "\n\n 30 runs for all tests for 1 map: " << duration_cast(end_test-start_test).count() << " seconds\n\n"; // test takes 2hrs for 30 runs for one hashmap /* if the other maps have about the same operation times ************ // possible maps to bench. priorities are that the interface must be the same/similar to unordered_map // and that we don't have to jump through hoops to get it to work 1. Google dense_hash_map [y] https://github.com/sparsehash/sparsehash 2. Google sparse_hash_map [y] 3. abseil node_hash_map [y] https://abseil.io/docs/cpp/tools/cmake-installs 4. abseil flat_hash_map [y] 5. Tessil/sparse-map/ [y] header only implementation for all tessil 6. Tessil/hopscotch-map[y] 7. tessil/robin-map[y] [y] 8. Boost unordered_map [y] just install boost with your package manager 9. skarupke/flat_hash_map [y] header only implementation 10. skarupke /bytell_hash_map [y] 11. skarupke/unordered_map [y] 12. greg7mdp/parallel-hashmap/paralel_flat [y] header only 13. greg7mdp/parallel-hashmap/paralel_node [y] 17. emilk/emilib emilib::hashmap [y] header only 18. martinus robin_hood::unordered_node_map [y] 19. martinus/robin_hood/ flatmap [y] 3. folly F14ValueMap 4. folly F14NodeMap 5. Tessil/ordered-map [n] something is wrong with this one, verrrrry slow 6. Tessil/array-hash[n] (not with a small modification of the insert function) */ }