[libcxx-commits] [PATCH] D113413: Add introsort to avoid O(n^2) behavior and a benchmark for adversarial quick sort input.

Nilay Vaish via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 9 08:20:11 PST 2021


nilayvaish added inline comments.


================
Comment at: libcxx/include/__algorithm/sort.h:264
 
 template <class _Compare, class _RandomAccessIterator>
+void __introsort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
----------------
ldionne wrote:
> It seems to me like you reformatted a lot of this code, making the change itself a lot more difficult to understand. Please do the re-formatting either before or after your functional change, in a separate "no functionality change" patch.
I have dropped the formatting changes.  Those were done by arc and I just accepted them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113413/new/

https://reviews.llvm.org/D113413



More information about the libcxx-commits mailing list