3 ms·
lower_bound and upper_bound are typically implemented in terms of partition_point, which is much more general than this version of lower_bound taking an element
by commonlisp94 3y ago
lower_bound and upper_bound are typically implemented in terms of partition_point, which is much more general than this version of lower_bound taking an element.
- Aardwolf 3y agoEven more reason to use this if you don't need the more general case and its associated performance cost
- commonlisp94 3y agoPartition point is even simpler and can be optimized the same way. > if you don't need the more general case and its associated performance cost In C++ the "more general case" typically doesn't have a performance cost.