Hacker News new | past | comments | ask | show | jobs | submit login

These are flat_map, flat_set, flat_hash_map, etc ...

See: https://en.cppreference.com/w/cpp/header/flat_map




I believe that flat_map and flat_set at least are sorted, so that binary_search/lower_bound can be used for lookups.

Linear search generally does outperform for small collections though (it’s better for caches and the branch predictor).


C++23! The future is here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: