summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/qsort.3
diff options
context:
space:
mode:
authormillert <>2017-05-20 12:48:56 +0000
committermillert <>2017-05-20 12:48:56 +0000
commit78fdfc7b710f4922d56e067d044f7f7087c0872e (patch)
tree70cacb19950e1b5c46c66a865398a84d600761f5 /src/lib/libc/stdlib/qsort.3
parentabfa5942eee63f49119ddd016cb3f95b77b7c16b (diff)
downloadopenbsd-78fdfc7b710f4922d56e067d044f7f7087c0872e.tar.gz
openbsd-78fdfc7b710f4922d56e067d044f7f7087c0872e.tar.bz2
openbsd-78fdfc7b710f4922d56e067d044f7f7087c0872e.zip
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.
Diffstat (limited to 'src/lib/libc/stdlib/qsort.3')
0 files changed, 0 insertions, 0 deletions