[libc-commits] [libc] [llvm] [libc] Improve qsort (PR #120450)

Schrodinger ZHU Yifan via libc-commits libc-commits at lists.llvm.org
Thu Dec 19 10:49:07 PST 2024


================
@@ -18,11 +18,12 @@ namespace internal {
 // A simple in-place heapsort implementation.
 // Follow the implementation in https://en.wikipedia.org/wiki/Heapsort.
 
-LIBC_INLINE void heap_sort(const Array &array) {
-  size_t end = array.size();
+template <typename A, typename F>
+void heap_sort(const A &array, const F &is_less) {
----------------
SchrodingerZhu wrote:

For consistency, could you please mark all these functions as `LIBC_INLINE`?

https://github.com/llvm/llvm-project/pull/120450


More information about the libc-commits mailing list