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

View File

@@ -20,7 +20,6 @@
#include "keccak.h"
#include "uv_util.h"
#include <random>
#include <unordered_map>
extern "C" {
#include "crypto-ops.h"
@@ -237,8 +236,8 @@ public:
private:
uv_mutex_t m;
std::unordered_map<std::array<uint8_t, HASH_SIZE * 2>, hash> derivations;
std::unordered_map<std::array<uint8_t, HASH_SIZE * 2 + sizeof(size_t)>, hash> public_keys;
unordered_map<std::array<uint8_t, HASH_SIZE * 2>, hash> derivations;
unordered_map<std::array<uint8_t, HASH_SIZE * 2 + sizeof(size_t)>, hash> public_keys;
};
static Cache* cache = nullptr;