From 07abbe12e58628916725ac29280d216ab04ecb18 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 27 Jun 2025 12:15:48 +0200 Subject: [PATCH] lmdb-safe: Use unordered maps for the transaction maps We don't need the maps to be ordered, and unordered maps are usually slightly faster. Signed-off-by: Remi Gacogne (cherry picked from commit 883aec59cf56f9345b0a229ed7af35490a113494) --- ext/lmdb-safe/lmdb-safe.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/lmdb-safe/lmdb-safe.hh b/ext/lmdb-safe/lmdb-safe.hh index 2f19124c69..294fba6bae 100644 --- a/ext/lmdb-safe/lmdb-safe.hh +++ b/ext/lmdb-safe/lmdb-safe.hh @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include @@ -111,8 +111,8 @@ public: private: std::mutex d_openmut; std::shared_mutex d_countmutex; - std::map> d_RWtransactionsOut; - std::map> d_ROtransactionsOut; + std::unordered_map> d_RWtransactionsOut; + std::unordered_map> d_ROtransactionsOut; }; std::shared_ptr getMDBEnv(const char* fname, int flags, int mode, uint64_t mapsizeMB=(sizeof(void *)==4) ? 100 : 16000); -- 2.47.2