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

[C++] (Possibly) Adopt unordered_map replacement #45452

Open
pitrou opened this issue Feb 6, 2025 · 0 comments
Open

[C++] (Possibly) Adopt unordered_map replacement #45452

pitrou opened this issue Feb 6, 2025 · 0 comments

Comments

@pitrou
Copy link
Member

pitrou commented Feb 6, 2025

Describe the enhancement requested

We use unordered_map quite a bit internally. This can have performance issues if the hash table grows large. We may want to replace those uses with a faster associative container that would have better performance and/or a smaller memory footprint.

This pages gives useful pointers: https://martin.ankerl.com/2022/08/27/hashmap-bench-01/

Caveats:

  1. the replacement must be easily vendorable, with no additional dependencies (this excludes abseil, folly, etc.)
  2. the replacement should be maintained
  3. we probably don't want to replace uses of unordered_map in public APIs with a non-standard container type

From the looks of it, https://github.com/martinus/unordered_dense might be a good candidate.

Related: #25111

Component(s)

C++

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

No branches or pull requests

1 participant