When you have a large collection of unsorted items, your choice of sort algorithms can greatly impact how long it takes to sort your items properly. There are numerous sort algorithms, but in this tutorial, I will focus on one of the fastest sort algorithms, quicksort. On average, quicksort works in n * log(n) time which is ideal for most uses.
Quicksort is known as a divide-and-conquer algorithm. What this means is, given an input, it divides the input into smaller parts before performing an operation on those parts as opposed to working on the entire input at once. One way of looking at it is that it is easier to eat food in smaller bite-size pieces as opposed to the whole thing at once.