[PATCH] D93233: [libc++] Replaces std::sort by Bitset sorting algorithm.

Nilay Vaish via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 8 16:02:19 PST 2021


nilayvaish marked 2 inline comments as done.
nilayvaish added a comment.

ldionne@, I am going to break this change into few parts and provide the benchmark results for each of the part separately.  To begin with, I have posted: https://reviews.llvm.org/D113413 that makes the introsort change to the std::sort implementation.



================
Comment at: libcxx/include/__algorithm/sort.h:34
 
-// stable, 2-3 compares, 0-2 swaps
+namespace __sorting_network {
 
----------------
ldionne wrote:
> Why is this called `__sorting_network`? Sounds like a weird name.
I think the name has been prevalent in the theory community for a long time.  More info here: https://en.wikipedia.org/wiki/Sorting_network.  The code in functions __sort[3...8] mimics what the sorting networks for those lengths would look like.  The name is strange from namespace perspective.  Willing to name it something else that you prefer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93233



More information about the llvm-commits mailing list