diff options
author | millert <> | 2017-05-20 12:48:56 +0000 |
---|---|---|
committer | millert <> | 2017-05-20 12:48:56 +0000 |
commit | 30956d9c9f96333df0339b2915356b533d25eac0 (patch) | |
tree | 70cacb19950e1b5c46c66a865398a84d600761f5 /src/lib/libc/stdlib/qsort.3 | |
parent | ee669a2eb38964d5942ce9191de88cf3654a949f (diff) | |
download | openbsd-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