[futurebasic] Re:Quick Sort For Numbers (Answers & Code)

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: Robert Covington <t88@...>
Date: Wed, 9 Jun 1999 08:05:30 -0800
>I looked over the sorting routines and added one I found a few years ago,
>simply called "SORT".  I like "SORT" because it is small and fast.
>
>My analysis of the four sort routines:


I appreciate all the help and code in response to my question. The biggest
slowdown I found is due not necessarily to the method (bubble excepted),
but when using an array of floating point numbers instead of integer.

That is, array%(100) is tons times faster to sort than array!(100)

Something like 240 ticks vs. 4000 or more in one test I did using the FB
Examples shell sort.

Shell looks like the winner. Haven't tried the combsort yet though.

Anyway, with all the ideas posted I should be able to sort my arrays just
fine. I guess I will multipy convert my floating point values into an
integer array, then divide convert them back into the floating point array
after they are sorted.

Thanks to everyone.

Robert Covington