M
Martin Gregorie
This was in "Software Tools in Pascal" (Kernighan & Plauger).Tony Hoare, being a scholar and a gentleman, made a strong but measured
claim about it (from the conclusion of [1]):
K&P describe shellsort as approximating N**1.5 and say that it averagesI very much doubt that anyone worth listening to has ever made a claim
that quicksort is the fastest in every situation. Pathological cases
have been known for such a long time that to do so would be to court
honorary membership of the Flat Earth Society.
NlogN but can degrade to n**2 but that worse than NlogN is 'very rare',
addinf that to sort an array "just enter 'quick(v, 1, n)' and stand well
back". I probably ascribed too much weight to that remark, but OTOH the
book says almost nothing about what can degrade its performance.
It then goes on to talk about sort-merges which I really related to since
I was using a box with 48K RAM at the time and wasn't long away from
mainframes with little RAM (multi-user operation with 32 Kwords of RAM:
96 KB equivalent), so all disk sort utilities were of the sort-merge
variety - tape sorts were pure multi-way merges preceeded by a collation
phase).