CVSROOT: /cvs Module name: src Changes by: mill...@cvs.openbsd.org 2017/05/20 06:48:56
Modified files: lib/libc/hidden: stdlib.h lib/libc/stdlib: heapsort.c qsort.c Log message: Use David Musser's introsort algorithm to fall back to heapsort(3) when the recursion depth reaches 2*lg(n + 1). This avoids quicksort's quadratic behavior for pathological input without appreciably changing the average run time.