Hacker News new | past | comments | ask | show | jobs | submit login

> For starters, it's a stable sort, which excludes quicksort right out the gates.

Negative, it excludes in-place quicksort but out-of-place quicksort can be stable just fine.

> Third, for very short sequences (also a common situation) it's an insertion sort, which is extremely efficient due to the low overhead (even more so combined with the adaptivity which insertion sort also has).

Every modern quicksort implementation also does this (or a similarly efficient smallsort).




Hi, you are ignoring the second point, and for the other two points you are referring to particular extensions of quicksort. Quite possibly you can extend quicksort similar to how timsort extended mergesort, but if that was commonplace nobody would care about timsort.


> and for the other two points you are referring to particular extensions of quicksort

Maybe for the third point, but once again, every implementation does this. For the first point, absolutely not. Just because in-place partitioning is often the only variant described, out-of-place partitioning is absolutely just quicksort, not an extension.

> Quite possibly you can extend quicksort similar to how timsort extended mergesort

Please see my top comment in this thread - I have done exactly that. Or rather, I have extended powersort (which is very similar to timsort) with quicksort.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: