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

Michael Jones via libc-commits libc-commits at lists.llvm.org
Thu Dec 19 13:13:35 PST 2024


================
@@ -15,9 +15,13 @@
 #define LIBC_QSORT_QUICK_SORT 1
 #define LIBC_QSORT_HEAP_SORT 2
 
+#ifdef LIBC_OPTIMIZE_FOR_SIZE
+#define LIBC_QSORT_IMPL LIBC_QSORT_HEAP_SORT
+#else
----------------
michaelrj-google wrote:

There doesn't need to be a specific check here. The algorithm selection is done in [`config.json`](https://github.com/llvm/llvm-project/blob/main/libc/config/config.json#L96)

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


More information about the libc-commits mailing list