TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: GEORGE WHITE
from: DAVID NOON
date: 1998-04-16 21:02:00
subject: Insertion Or Bubble?

In a message dated 04-15-98, George White said to John Gardeniers about
Insertion Or Bubble?
Hi George,
GW>The sort you use is a customised version of one Jonathan de Boyne
GW>Pollard calls a "comb sort", he posted sample code over in C_Plusplus
GW>recently.
This raises the exclamation, "Is that all it is?" ... :-)
So, I would infer it uses (more or less) Shell's accelerator on some simpler
algorithm such as bubble sort. This is what Jonathan's code did.
GW>It stacks up well in general use, in my testing a comb sort
GW>is generally around the performance of shellsort, though shellsort
GW>does slightly better on very close to ordered data.
I would have thought Shellsort would do slightly better all around, at least
for arrays of elementary types.
GW>I would expect quickersort with all the tweaks and customised to the
GW>application to be better as well (in my testing a customised version
GW>of the qsort() from RG_QSORT.C in SNIPPETS takes about half the time
GW>of your sort on my small tag file which is partially sorted, but is
GW>slower on already sorted data).
An expected result. I would also expect the ratio to vary slightly with the
size of the dataset, as well as its "orderliness".
GW>I doubt if the margin of improvement
GW>would justify your changeing sorts, especially in F-Tags which will
GW>normally have ordered data with a few random taglines added on the end.
For close to ordered data, Insertion sort would probably do almost as well,
and it is smaller than Combsort or Shellsort.
Regards
Dave

___
 * MR/2 2.25 #353 * Windows NT: The Edsel of operating systems
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.