[libcxx-commits] [libcxx] [libc++] Optimize rotate (PR #120890)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 19 09:03:19 PST 2025


================
@@ -170,7 +152,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _RandomAccessIterator
       return std::__rotate_left<_AlgPolicy>(__first, __last);
     if (_IterOps<_AlgPolicy>::next(__middle) == __last)
       return std::__rotate_right<_AlgPolicy>(__first, __last);
----------------
ldionne wrote:

In another patch, we should rewrite this dispatching. The `is_trivially_move_assignable` is especially concerning.

https://github.com/llvm/llvm-project/pull/120890


More information about the libcxx-commits mailing list