Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nightcracker
· 11y ago · 0 comments
No, it is fought by switching to heapsort if the recursion depth exceeds 2*log2(n).
Comments
[–]
sbi
11y ago
Heapsort has poor cache performance though. Its asymptotic complexity depends on the assumption that memory access is O(1), which is not borne out in practice.
[–]
orlp
11y ago
This is true, but the worst case of quicksort is so rare that this does not matter for average performance.