How to optimize a Python function that sorts large datasets?

Posted by Secret-Bat-1683@reddit | learnprogramming | View on Reddit | 7 comments

So lets say I am trying to need to optimize a Python function that sorts large datasets. Currently my approach is too slow for datasets with hundreds of elements. How would you improve the function using a more efficient algorithm, like QuickSort or MergeSort, and why would it perform better?