[libcxx-commits] [libcxx] [libcxx][algorithm] Optimize std::stable_sort via radix sort algorithm (PR #104683)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 17 12:54:59 PDT 2024
=?utf-8?b?0JTQvNC40YLRgNC40Lkg0JjQtw=?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/104683 at github.com>
philnik777 wrote:
> Radix sort is much faster than comparison sorts (including `std::sort`), especially in case of random input data. So forwarding to `std::sort` will not provide desired speed up. [Here are some old benchmarks of raw radix sort in my library](https://github.com/izvolov/burst?tab=readme-ov-file#%D1%86%D0%B5%D0%BB%D0%BE%D1%87%D0%B8%D1%81%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5-%D1%81%D0%BE%D1%80%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B8).
If that is the case, why wouldn't we use it in `std::sort` then?
https://github.com/llvm/llvm-project/pull/104683
More information about the libcxx-commits
mailing list