[core] Switch to ankerl::unordered_dense

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-11-24 17:34:56 +00:00
parent 03132c6877
commit ef6522ed28
282 changed files with 4386 additions and 1456 deletions

View File

@@ -10,8 +10,7 @@
#include "search/search_params.hpp"
#include "search/utils.hpp"
#include <unordered_map>
#include <unordered_set>
#include "3party/ankerl/unordered_dense.h"
namespace base
{
@@ -90,16 +89,16 @@ private:
base::Cancellable const & m_cancellable;
Index m_index;
std::unordered_map<Id, DocVec> m_docs;
ankerl::unordered_dense::map<Id, DocVec> m_docs;
bool m_indexDescriptions = false;
std::unordered_set<GroupId> m_indexableGroups;
ankerl::unordered_dense::set<GroupId> m_indexableGroups;
// Currently a bookmark can belong to at most one group
// but in the future it is possible for a single bookmark to be
// attached to multiple groups.
std::unordered_map<Id, GroupId> m_idToGroup;
std::unordered_map<GroupId, std::unordered_set<Id>> m_bookmarksInGroup;
ankerl::unordered_dense::map<Id, GroupId> m_idToGroup;
ankerl::unordered_dense::map<GroupId, ankerl::unordered_dense::set<Id>> m_bookmarksInGroup;
};
} // namespace bookmarks
} // namespace search