Skip to content

Commit

Permalink
perf(common): replace std unordered container with boost's (#937)
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 authored Oct 11, 2024
1 parent aaaaaec commit b907d7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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>
#include <boost/unordered_set.hpp>

#ifdef RIME_ENABLE_LOGGING
#include <glog/logging.h>
Expand All @@ -48,9 +48,9 @@ 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>;
using hash_set = boost::unordered_set<T>;

template <class T>
using the = std::unique_ptr<T>;
Expand Down

0 comments on commit b907d7d

Please sign in to comment.