3 ms·
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 fo
by usefulcat 4y ago
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).