From 883aec59cf56f9345b0a229ed7af35490a113494 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 --- 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 80f4f408a4..049311a502 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 @@ -116,8 +116,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); -- 2.47.2