Entry
I have an array of records (1000's of them) to sort by any of the record fields. Any fast solutions?
Aug 18th, 2002 08:55
Bemi Faison, Gareth Hay,
I don't know if there are any benchmark tests exist, but I've attempted to sort a number of array elements in various ways and the "sort()" method is best.
Custom sort functions slow down the process considerably, and for-loops are even worse. Perhaps a while loop might work, but the difference between the speed of native code and interpreted code determine which is faster.
Perhaps you can break down the sorting process in steps, and only use custom sorting methods where it's absolutely necessary?