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

Marco Gelmi via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 20 00:56:04 PDT 2022


marcogelmi added a comment.

FWIW I think this would be a good change to accept for the following reasons:

1. random patterns are more likely than specific patterns, especially because some of these patterns are quite unrealistic (e.g. single element repeated 256k times)
2. these deterministic patterns tend to be much faster to sort anyway (e.g. ~1ns vs ~64ns for ascending vs random)
3. the fact that they are so fast also increases the measurement noise so the numbers might not be entirely reliable
4. for the reasons above, I see the benchmarks for these edge cases to be more of a sanity check (i.e. are we making ascending terrible? this does not seem to be the case here)
5. the numbers for strings are great and sorting strings is one of the most common use cases


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