feat: use unordered_map instead of map

main
mandlm 2024-03-22 15:37:13 +01:00
parent 8ca68b0e9a
commit 3f3ad0c765
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
4 changed files with 6 additions and 7 deletions

View File

@ -3,11 +3,11 @@
#include "finder.h"
#include "word_list.h"
#include <map>
#include <unordered_map>
class Bucket {
private:
std::map<char, WordRefList> directory_;
std::unordered_map<char, WordRefList> directory_;
public:
void insert(const WordList &word_list, size_t first_index, size_t last_index);

View File

@ -3,11 +3,11 @@
#include "finder.h"
#include "word_list.h"
#include <map>
#include <unordered_map>
class GroupedFinder : public Finder {
private:
std::map<char, WordRefList> groups_;
std::unordered_map<char, WordRefList> groups_;
public:
GroupedFinder(const WordList &word_list);

View File

@ -3,12 +3,12 @@
#include "finder.h"
#include "word_list.h"
#include <map>
#include <unordered_map>
class SearchTreeNode {
private:
WordRefList words_;
std::map<const char, SearchTreeNode> children_;
std::unordered_map<char, SearchTreeNode> children_;
public:
void insert(std::string_view partial_word, const std::string *original_word);

View File

@ -1,6 +1,5 @@
#include "grouped_finder.h"
#include <forward_list>
#include <mutex>
#include <thread>
#include <vector>