Top
Best
New

Posted by Voultapher 9/11/2025

The unreasonable effectiveness of modern sort algorithms(github.com)
167 points | 58 commentspage 2
TinkersW 9/14/2025|
Is there a C++ port of ipnsort?
throwaway984393 9/15/2025||
[dead]
dvh 9/14/2025||
Isn't this just another case of premature optimization? Shouldn't you be adjusting sorting algorithms only when customer complains?
grues-dinner 9/14/2025||
I think the article basically had this conclusion. Think twice before optimising here because you may be able to squeeze something out for a very limited scenario but it can have ugly failure modes and it end up being slower in some cases. Plus it takes time and effort. And modern standard sorts are "unreasonably" fast anyway for many practical purposes.

Then again only thinking of fixing things when a customer complains is a way to end up with a leaning tower of hacks which eventually ossify and also the customer (or rather the users, who may not be the customer especially in business software) may be putting up with dozens of niggles and annoyances before they bother to actually report one bug because they can't work around it.

hyperpape 9/14/2025|||
It only makes sense to talk about premature optimization in the context of building a production system (or a standard library).

This is research or experimentation, designed to improve our understanding of the behavior of algorithms. Calling it premature optimization makes no sense.

codegladiator 9/14/2025||
This is pushing the limits to identify the boundaries
dvh 9/14/2025||
Also known as premature optimization. You had to literally invent new dataset just to show there is a difference. You are inventing problems, stop doing that!
dspillett 9/14/2025|||
> You are inventing problems

Sometimes that is how useful jumps are made. Maybe someone will come along with a problem and the data they have just happens to have similar properties.

Rather than premature optimisation this sort of thing is pre-emptive research - better to do it now than when you hit a performance problem and need the solution PDQ. Many useful things have come out of what started as “I wonder what if …?” playing.

gpvos 9/15/2025|||
This is research, not production code. Premature optimization is irrelevant.
DennisL123 9/14/2025|
Efficiency, not effectiveness. They are all effective in the sense that they produce sorted results. Even the non-modern sort algorithms are effective in the sense that the results are correct. This should be about the efficiency with which they do it, right?
JSR_FDED 9/14/2025||
From TFA:

The title is an homage to Eugene Wigner's 1960 paper "The Unreasonable Effectiveness of Mathematics in the Natural Sciences".

aabhay 9/14/2025|||
Agreed. Effectiveness would imply that some algorithms are more likely to sort the list correctly than others, or they sort a higher percentage of elements. Efficiency is about factors external to the correctness
creata 9/14/2025||
"The Unreasonable Effectiveness of Mathematics in the Natural Sciences" is one of those titles that gets imitated a lot for some reason. Maybe even more than "Goto Considered Harmful".
kwertyoowiyop 9/14/2025||
Coming next: “What we talk about when we talk about modern sort algorithms”
rcxdude 9/14/2025|||
or "we need to talk about what we talk about when we talk about the unreasonable effectiveness of title memes are all you need considered harmful"
chuckadams 9/14/2025||||
"Optimize your sorts with this one weird trick."

"What they don't want you to know about sorting."

j_not_j 9/15/2025|||
Ascending is all you need.