by ULLI (93 Submissions)
Category: String Manipulation
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (9 Votes)
Quicksort which works by sorting string pointers only instead of the strings themselves. In particular for long strings around 1000 chars there is a 15 times improvement in speed, going up to 100 times for really long strings, and speed is almost indepent of string length; one million strings are sorted in under five seconds. For short strings below 10 chars or so speeds are more or less identical. The screenshot shows the compiled timing.
Download A quicker Quicksort (up to 100 times faster) (6 KB)