feat: use unordered_map instead of map
parent
8ca68b0e9a
commit
3f3ad0c765
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "grouped_finder.h"
|
||||
|
||||
#include <forward_list>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
|
Loading…
Reference in New Issue