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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user