Remix.run Logo
dvh 3 days ago

Isn't this just another case of premature optimization? Shouldn't you be adjusting sorting algorithms only when customer complains?

grues-dinner 3 days ago | parent | next [-]

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 3 days ago | parent | prev | next [-]

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 3 days ago | parent | prev [-]

This is pushing the limits to identify the boundaries

dvh 3 days ago | parent [-]

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 3 days ago | parent | next [-]

> 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 2 days ago | parent | prev [-]

This is research, not production code. Premature optimization is irrelevant.