[libcxx-commits] [libcxx] [libc++] Optimize most of the __tree search algorithms (PR #155245)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 28 08:52:31 PDT 2025
================
@@ -2030,10 +2035,12 @@ template <class _Key>
typename __tree<_Tp, _Compare, _Allocator>::size_type
__tree<_Tp, _Compare, _Allocator>::__count_unique(const _Key& __k) const {
__node_pointer __rt = __root();
+ auto __comp = __three_way_comparator<value_compare, _Key, value_type>(value_comp());
----------------
ldionne wrote:
I'd like to find a way to express the fact that this isn't just a normal three-way comparison. I think that changing the name to e.g. `__hoisted_three_way_comparator` or `__lazy_three_way_comparator` (which isn't quite right though) would help.
https://github.com/llvm/llvm-project/pull/155245
More information about the libcxx-commits
mailing list