Sorting algorithm: Difference between revisions

Content deleted Content added
Comparison of algorithms: - Fixed Width to 350 for Column "Other Notes" for viewing on smaller screens
Line 371:
Another technique for overcoming the memory-size problem is to combine two algorithms in a way that takes advantages of the strength of each to improve overall performance. For instance, the array might be subdivided into chunks of a size that will fit easily in RAM (say, a few thousand elements), the chunks sorted using an efficient algorithm (such as [[quicksort]] or [[heapsort]]), and the results merged as per [[mergesort]]. This is less efficient than just doing mergesort in the first place, but it requires less physical RAM (to be practical) than a full quicksort on the whole array.
 
Techniques can also be combined. For sorting very large sets of data that vastly exceed system memory, even the index may need to be sorted using an algorithm or combination of algorithms designed to perform reasonably with [[virtual memory]], i.e., to reduce the amount of swapping required. sashikumar
 
== See also ==