Friday, August 30, 2013

Sorting big data

That sorting thing is a big deal sometimes. We've all sorted data on a spreadsheet -- but that happens at the blink of an eye. Big data takes a bit longer.

Here's a graphic video demonstration of 15 different sorting methodologies all applied to the same data set, one method at a time (and, set to music). The method is in the small type at the upper left of the video screen.
Sorts random shuffles of integers, with both speed and the number of items adapted to each algorithm's complexity.
The algorithms are: selection sort, insertion sort, quick sort, merge sort, heap sort, radix sort (LSD), radix sort (MSD), std::sort (intro sort), std::stable_sort (adaptive merge sort), shell sort, bubble sort, cocktail shaker sort, gnome sort, bitonic sort and bogo sort (30 seconds of it).

It's fun to watch -- but there's information here also. Take note of how fast one method works compared to another, and note the intermediate data patterns that emerge.

After each method completes, it will be obvious; a big green triangle appears -- you have to see it to know what I'm talking about.

Anyway, it's a fun 6 minutes:

Check out these books I've written in the library at Square Peg Consulting