a***n 发帖数: 1616 | 1 优化部分基本是抄的glibc qsort的,不过glibc的写得太烂了,只要了它的idea ...
1. median-3 pivot
2. 3-way partition with optimized tight inner loops
3. non-recursive, w/ log(n) stack, always finish shorter partition first
4. qsort + final insertion sort hybrid with THRESH=5
5. optimized tight inner loop for final insertion sort |
|