Try to use ankerl::unordered_dense::map instead of std::unordered_map in UnorderedMapStorage
This commit is contained in:
parent
c3683201e6
commit
cf4141dffd
@ -10,6 +10,7 @@
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm::util
|
||||
@ -56,7 +57,10 @@ template <typename NodeID, typename Key> class MapStorage
|
||||
template <typename NodeID, typename Key> class UnorderedMapStorage
|
||||
{
|
||||
public:
|
||||
explicit UnorderedMapStorage(std::size_t) { nodes.rehash(1000); }
|
||||
explicit UnorderedMapStorage(std::size_t)
|
||||
{
|
||||
// nodes.rehash(1000);
|
||||
}
|
||||
|
||||
Key &operator[](const NodeID node) { return nodes[node]; }
|
||||
|
||||
@ -80,6 +84,7 @@ template <typename NodeID, typename Key> class UnorderedMapStorage
|
||||
|
||||
private:
|
||||
ankerl::unordered_dense::map<NodeID, Key> nodes;
|
||||
// std::unordered_map<NodeID, Key> nodes;
|
||||
};
|
||||
|
||||
template <typename NodeID,
|
||||
|
Loading…
Reference in New Issue
Block a user