Hi!
Do you want to discuss this topic from the sciense point of view? Here we do not used ANY assumption about distribution of record. Anyway, a loop and a lot of statements in VFP FAR slower than ASORT() for ANY distribution, as far as I know, just because VFP commands are done by pure interpreter, when ASORT() is a C++ code done by processor. Maybe, for little number of elements VFP routine can be more quick, however, with large number of elements it is not comparable.
>Vlad:
>
>> Custom algorithm over large number of object will work slowly, it cannot be more quick than a C++ routine in ASORT(). Also, there are only a few lines of code for this approach, when custom sorting algorithm is a lot of programming...
>
>I disagree.
>
>ASORT is not always faster than a custom program because ASORT uses one of the sorting algorithms and there is no single algorithm that is faster than all other algorithms when sorting arrays whose elements may or may not be randomly ordered. ASORT is fast but it's not always the best thing to use if you have a good idea how the elements are distributed within the array.
>
>Daniel
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.