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.
This commit is contained in:
Wilhelm Schuermann 2015-11-04 07:52:19 +01:00
parent 80b5a584b7
commit 41843d77b0

View file

@ -95,8 +95,8 @@ public:
File _file;
private:
std::map <int, std::string> _I2U; // ID -> UUID map
std::map <std::string, int> _U2I; // UUID -> ID map
std::unordered_map <int, std::string> _I2U; // ID -> UUID map
std::unordered_map <std::string, int> _U2I; // UUID -> ID map
};
// TDB2 Class represents all the files in the task database.