mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
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:
parent
80b5a584b7
commit
41843d77b0
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue