Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(common): replace std unordered_map with boost's #937

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WhiredPlanck
Copy link
Contributor

Pull request

Issue tracker

Fixes will automatically close the related issue

Fixes # N/A

Feature

Describe feature of pull request

The latter has considerable performance improvement compared with the former.

Unit test

  • Done

Manual test

  • Done

Code Review

  1. Unit and manual test pass
  2. GitHub Action CI pass
  3. At least one contributor reviews and votes
  4. Can be merged clean without conflicts
  5. PR will be merged by rebase upstream base

Additional Info

The latter has considerable performance improvement compared with the former.
@@ -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>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about unordered_set? Will this get the same performance improvement?

Let alone performance, I'd be very frustrated to learn that hash_map and hash_set come from different libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants