I need to use a sorting algorithm in a list that has as much as 500,000 elements. This program runs on an embedded PC. Does anyone knows which sorting algorithm has the best performance开发者_如何学C in time complexity as well as in memory?
Some good information about sorting algorithms can be found at http://www.sorting-algorithms.com/
If the values of the items are not very large (8-bit or even 16), you should try one Integer Sort, like Counting sort or other http://en.wikipedia.org/wiki/Counting_sort
精彩评论