Switch to faster unordered_map/set

This commit is contained in:
SChernykh
2021-10-22 18:18:38 +02:00
parent 04d18cdf1d
commit 148b9dd294
16 changed files with 70 additions and 42 deletions
+3 -5
View File
@@ -19,8 +19,6 @@
#include "uv_util.h"
#include <map>
#include <unordered_map>
#include <unordered_set>
namespace p2pool {
@@ -98,9 +96,9 @@ private:
mutable uv_mutex_t m_sidechainLock;
PoolBlock* m_chainTip;
std::map<uint64_t, std::vector<PoolBlock*>> m_blocksByHeight;
std::unordered_map<hash, PoolBlock*> m_blocksById;
std::unordered_set<hash> m_seenBlocks;
std::unordered_map<hash, time_t> m_seenWallets;
unordered_map<hash, PoolBlock*> m_blocksById;
unordered_set<hash> m_seenBlocks;
unordered_map<hash, time_t> m_seenWallets;
std::vector<DifficultyData> m_difficultyData;