Quicksort vs. Shell
|
06-16-2014, 09:38 PM
Post: #1
|
|||
|
|||
Quicksort vs. Shell
Does anyone has experience with these two sort methods on calculators?
Quicksort is theoretically faster for large sets, but that wouldn't apply to calculators, where we are talking of sorting lists with a few objects. I've seen some benchmarks where for less than 500 elements, Shell sort is actually faster (is it true in general?). Shell sort seems more consistent for all cases, while quicksort is faster in average, but it hits bad cases quite often (but all this is general talk for large sets). The use case is to sort lists in RPL. The algorithm itself would be sorting only the pointers to the objects, and generic objects will have to be compared with the RPL operator '>'. So this use case could be considered a fast-copy, slow-compare case. I wonder if anyone knows of a good comparison for small sets of both algorithms. Most of the benchmarks found online are for large sets, where quicksort has the advantage, but it's outside of the normal calculator use. Claudio |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)