[libcxx-commits] [PATCH] D122780: Modify std::sort: add BlockQuickSort partitioning algorithm for arithmetic types

Nilay Vaish via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 31 12:06:03 PDT 2022


nilayvaish added a comment.

Pinging @ldionne.  Can you comment on the data that would help you to make the decision?  I am trying to convince folks at Google on trying out this diff.  The main question being asked is what data you would like to see?

In D122780#3869112 <https://reviews.llvm.org/D122780#3869112>, @nilayvaish wrote:

> In D122780#3850519 <https://reviews.llvm.org/D122780#3850519>, @ldionne wrote:
>
>> As it stands, we basically have to decide whether to optimize for randomly sorted data or to also take into account common patterns IIUC. That's not a super easy call to make, since we're talking about 40-50% improvements and 40-50% regressions in each case. I remember @Morwenn had mentioned pdqsort previously, and that seemed to be an algorithm that would handle both random data and also patterns properly. Would that solve the problems of this algorithm?
>
> @ldionne : if we collect and provide data on the relative change in cycles spent on std::sort for Google's data centers with the new implementation, would that be sufficient to land this diff in libcxx?  How much improvement would you expect from the new implementation for tilting the balance in its favor?




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122780



More information about the libcxx-commits mailing list