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
commit30956d9c9f96333df0339b2915356b533d25eac0 (patch)
tree70cacb19950e1b5c46c66a865398a84d600761f5 /src/lib/libc/stdlib/qsort.3
parentee669a2eb38964d5942ce9191de88cf3654a949f (diff)
downloadopenbsd-30956d9c9f96333df0339b2915356b533d25eac0.tar.gz
openbsd-30956d9c9f96333df0339b2915356b533d25eac0.tar.bz2
openbsd-30956d9c9f96333df0339b2915356b533d25eac0.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