Sorting items into order is an important task in computing, and a great deal of intellectual effort has been put into studying various techniques optimised for different circumstances. For example, sorting a small collection of objects that fit into memory is one thing, while a huge database that spans multiple removable storage media is entirely another. An algorithm that works well for data that's initially in completely random order may not be the best for data which is mostly already sorted. Donald Knuth wrote an 800 page book on Sorting and Searching, and new work on the topic is published every year.
This video visualises the behaviour of fifteen different sorting algorithms, ranging from very good to horrific (“bogosort”), each operating on a set of random integers with a size adapted to the efficiency of the algorithm. Here is background on how the video was made. A YouTube playlist of additional sorting algorithms is available.