News for hackers. Stuff that matters.
Re:Timsort is a sorting algorithm that is efficient for real... by mehrdadn on Monday July 02, 2018 @04:35AM (#17440136)
Here's an idea: if you're on Linux, use this to sort the list of all paths on your file system (find / -xdev). It's a nice dataset since it's (a) a large list, (b) comparisons are nontrivial, and (c) it's a realistic mix of somewhat-sorted-but-not-completely. (Note: If the file system already sorts everything this won't do the job, so it won't work on e.g. WSL.)
Re:Timsort is a sorting algorithm that is efficient for real... by praptak on Monday July 02, 2018 @07:55AM (#17440902)
Sorting strings by generic comparison is very inefficient regardless of the algorithm you choose, especially if the long prefixes repeat, which is the case for FS paths.
Re:Timsort is a sorting algorithm that is efficient for real... by mehrdadn on Monday July 02, 2018 @08:01AM (#17440935)
I wasn't trying to suggest otherwise.