You're not the first to ask the question (or to get it from the same source:
a class)
http://groups.google.com/group/micr...149dfac47d8/5eb95ec18b1007a2#5eb95ec18b1007a2
Some other possible leads or at least interesting related reading (if you
consider reading about test results of various sort algorithms interesting)
http://www.standards.com/Sorting/SortPerformanceComparison-Description.html
http://www.mvps.org/dmcritchie/excel/sorting.htm
So, young grasshopper, the question remains unanswered, a secret of the
universe to yet be discovered... wax on.... wax off....
If I had to GUESS, I'd put my bet on a variation of either a QuickSort or
Heap Sort. I base that guess on the ability of Excel's sort to give various
errors (as out of stack space and/or out of memory). You would not get that
behavior from a simple (and extremely inefficient) bubble sort unless the
amount of data was simply overwhelming. I don't think you'd get the
performance you see out of a bubble sort either - not for large numbers.
Now - did anyone think there might be two or more algorithms inside of the
Sort option? It's possible, since in some cases a bubble sort, for example,
can be more efficient than one of the others when used on a small number of
items to be sorted? Imagine a routine that determines the number of items to
be sorted and simply says, in effect, if # to sort is less than X, use
bubble, else use something fancier?
But regardless, the algorithm is customized to some degree - empty cells
always ending up at the bottom of the list rather than at the top (surely
emptiness is less than not-emptiness?). I believe there's a great
opportunity for a book: Zen and the Sort, or All Sorts of Zen, here somewhere.