TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: JOHN GARDENIERS
from: GEORGE WHITE
date: 1998-04-15 14:00:00
subject: Insertion Or Bubble?

Hi John,
Follow up:
GW>JG>If you ever received my F-tags.c posting have a look at
GW>JG>the sort used there.
GW>JG>Then compare it's performance under a variety of
GW>JG>conditions against anything
GW>JG>you have and tell me if you have anything better. If there
GW>JG>is a better general
GW>JG>purpose sort I would really love an example of it.
GW>Regrettably you posted F-tags.c (both the 7 part and the 3 part
GW>versions) over 6 months ago, at a time when Region 25 was not connected
GW>to the international C_Echo. So I don't have either version here :-(.
GW>If you have Internet Email, you can send it to me
Thanks, received.
The sort you use is a customised version of one Jonathan de Boyne
Pollard calls a "comb sort", he posted sample code over in C_Plusplus
recently. It stacks up well in general use, in my testing a comb sort
is generally around the performance of shellsort, though shellsort
does slightly better on very close to ordered data.
I would expect quickersort with all the tweaks and customised to the
application to be better as well (in my testing a customised version
of the qsort() from RG_QSORT.C in SNIPPETS takes about half the time
of your sort on my small tag file which is partially sorted, but is
slower on already sorted data). I doubt if the margin of improvement
would justify your changeing sorts, especially in F-Tags which will
normally have ordered data with a few random taglines added on the end.
George
 * SLMR 2.1a * Wastebasket: Something to throw things near.
--- 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™.