4 ms·
There are good reasons Timsort is used by the stdlib, namely that real world data is often partially sorted. Of course you can manufacture cases in which sorti
by keypusher 12y ago
There are good reasons Timsort is used by the stdlib, namely that real world data is often partially sorted. Of course you can manufacture cases in which sorting a numpy array via mergesort is faster than timsort on a stdlib list, but that doesn't make this headline appropriate. The author literally has one example. That's not how you characterize an algorithm. Is he unaware of big O? I wouldn't mind seeing a thorough review of the implementation and behavior differences between these two algorithms, but this article isn't it.