Use FlatHashTable instead of std::unordered_map/std::unordered_set.
This commit is contained in:
parent
e43d90c089
commit
cb559c396d
@ -7,17 +7,17 @@
|
||||
#pragma once
|
||||
|
||||
//#include "td/utils/FlatHashMapChunks.h"
|
||||
//#include "td/utils/FlatHashTable.h"
|
||||
//#include "td/utils/MapNode.h"
|
||||
#include "td/utils/FlatHashTable.h"
|
||||
#include "td/utils/MapNode.h"
|
||||
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
//#include <unordered_map>
|
||||
|
||||
namespace td {
|
||||
|
||||
template <class KeyT, class ValueT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
|
||||
//using FlatHashMap = FlatHashTable<MapNode<KeyT, ValueT>, HashT, EqT>;
|
||||
using FlatHashMap = FlatHashTable<MapNode<KeyT, ValueT>, HashT, EqT>;
|
||||
//using FlatHashMap = FlatHashMapChunks<KeyT, ValueT, HashT, EqT>;
|
||||
using FlatHashMap = std::unordered_map<KeyT, ValueT, HashT, EqT>;
|
||||
//using FlatHashMap = std::unordered_map<KeyT, ValueT, HashT, EqT>;
|
||||
|
||||
} // namespace td
|
||||
|
@ -7,17 +7,17 @@
|
||||
#pragma once
|
||||
|
||||
//#include "td/utils/FlatHashMapChunks.h"
|
||||
//#include "td/utils/FlatHashTable.h"
|
||||
//#include "td/utils/SetNode.h"
|
||||
#include "td/utils/FlatHashTable.h"
|
||||
#include "td/utils/SetNode.h"
|
||||
|
||||
#include <functional>
|
||||
#include <unordered_set>
|
||||
//#include <unordered_set>
|
||||
|
||||
namespace td {
|
||||
|
||||
template <class KeyT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
|
||||
//using FlatHashSet = FlatHashTable<SetNode<KeyT>, HashT, EqT>;
|
||||
using FlatHashSet = FlatHashTable<SetNode<KeyT>, HashT, EqT>;
|
||||
//using FlatHashSet = FlatHashSetChunks<KeyT, HashT, EqT>;
|
||||
using FlatHashSet = std::unordered_set<KeyT, HashT, EqT>;
|
||||
//using FlatHashSet = std::unordered_set<KeyT, HashT, EqT>;
|
||||
|
||||
} // namespace td
|
||||
|
Loading…
Reference in New Issue
Block a user