In a message dated 04-02-98, George White said to David Noon about Select,
Insert, Bubble!
Hi George,
DN>However, for larger arrays both bubble sort and Insertion sort should be
DN>left behind. We then move into the area where serious
DN>sorting algorithms are
DN>required, starting with Shellsort. [Or Combsort, if you prefer.]
GW>I've put together a C test harness for timing sorts, and while I allow
GW>the better sorts (quickersort, shellsort, Jonathans Combsort) to sort
GW>any settable size of array (a max char limit of 14000, as I'm using BC
GW>3.1 and I wanted all data in the near heap),
I use Watcom, especially when I'm being polymorphic.
GW>I limited timings of
GW>insertion sorts to 500 elements because they took _far_ too long to run
GW>with more.
Yes, Insertion sort is out of its league at that stage.
GW>I've run it with the sorts from SNIPPETS, Jonathan's Combsort
GW>(with some declarations moved to make it C) and your insertion sort.
GW>Sorting the same data set shellsort is always faster than Jonathan's
GW>Combsort.
As expected, since Combsort is based on bubble sort.
Regards
Dave
___
* MR/2 2.25 #353 * The last thing the world needs is Nerd Technology.
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)
|