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