Skip to content

Commit

Permalink
perf(common): replace std unordered_map with boost's
Browse files Browse the repository at this point in the history
The latter has considerable performance improvement compared with the former.
  • Loading branch information
WhiredPlanck committed Sep 17, 2024
1 parent 24f0f7b commit 4b923d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rime/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
#include <memory>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define BOOST_BIND_NO_PLACEHOLDERS
#include <boost/signals2/connection.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/unordered_map.hpp>

#ifdef RIME_ENABLE_LOGGING
#include <glog/logging.h>
Expand All @@ -48,7 +48,7 @@ using std::string;
using std::vector;

template <class Key, class T>
using hash_map = std::unordered_map<Key, T>;
using hash_map = boost::unordered_map<Key, T>;
template <class T>
using hash_set = std::unordered_set<T>;

Expand Down

0 comments on commit 4b923d2

Please sign in to comment.