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

[v1.1.0] Make internal associative contains use the std::less<> comparator #21

Closed
lmichaelis opened this issue Oct 31, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@lmichaelis
Copy link
Member

This allows for find-ing keys of type std::string using std::string_view which makes everything faster.

@lmichaelis lmichaelis added this to the v1.1.0 milestone Oct 31, 2022
@lmichaelis lmichaelis self-assigned this Nov 5, 2022
@lmichaelis
Copy link
Member Author

It seems this won't work for std::unordered_map in C++17. std::map would have to be used. This is fixed in C++20 with P0919R2 – Heterogeneous lookup for unordered containers.

The question then becomes, if we should prefer constant-time lookups with heap allocation to logarithmic-time lookups without heap allocations while keeping in mind that there may be thousands of keys.

@lmichaelis
Copy link
Member Author

All APIs with the exception of the deprecated way_net::waypoint have been migrated.

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

No branches or pull requests

1 participant