This is the fastest sorting algorithm ever

Practicus AI
4 min readSep 13, 2018

Want to be inspired? Come join my Super Quotes newsletter. 😎

Timsort is the fastest sorting algorithm ever. Made by a developer, for developers. It’s built for the real world — not constructed in academia.

Introducing Timsort

Timsort is a hybrid stable sorting algorithm, derived from merge sort and insertion sort, designed to perform well on almost any kind of real-world data. Tim Peter created Timsort (and its awesome name) for the Python programming language in 2001.

Timsort actually takes a very intuitive approach to sorting. Rather than jump right into calculations and operations like other sorting algorithms do, Timsort takes a step back. It first analyses the data that it will be sorting, and then based on that analysis will choose the most appropriate approach for the job!

So how efficient is it really? Well since its invention in 2001, its been used as the default sorting algorithm in Python, Java, Android OS, and Octave! Its a trusted and go-to method for sorting.

As for actual quantitative, check out the chart below of the Big-O complexities of various sorting algorithms, including Timsort. Timsort is actually a merger of insertion sort and merge sort in a really clever way!

--

--