From 41843d77b058a2999037d1548611ecd5fd8ad09b Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Wed, 4 Nov 2015 07:52:19 +0100 Subject: [PATCH] TDB2: Use efficient data structures for lookup - Leads to 1-3% improvement across all performance tests. - _I2U could very likely be further optimized by using a sparse vector, or handling the edge cases of this approach ourselves. --- src/TDB2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TDB2.h b/src/TDB2.h index 4353a4ee5..6d0365418 100644 --- a/src/TDB2.h +++ b/src/TDB2.h @@ -95,8 +95,8 @@ public: File _file; private: - std::map _I2U; // ID -> UUID map - std::map _U2I; // UUID -> ID map + std::unordered_map _I2U; // ID -> UUID map + std::unordered_map _U2I; // UUID -> ID map }; // TDB2 Class represents all the files in the task database.