logoalt Hacker News

devnullbrainyesterday at 12:41 PM3 repliesview on HN

> and the missing context is essential.

Oh yes, I'd recommend everyone who uses the phrase reads the rest of the paper to see the kinds of optimisations that Knuth considers justified. For example, optimising memory accesses in quicksort.


Replies

kalaksiyesterday at 12:52 PM

This shows how hard it is to create a generalized and simple rule regarding programming. Context is everything and a lot is relative and subjective.

Tips like "don't try to write smart code" are often repeated but useless (not to mention that "smart" here means over-engineered or overly complex, not smart).

show 1 reply
anymouse123456yesterday at 12:48 PM

Exactly!

I wish Knuth would come out and publicly chastise the many decades of abuse this quote has enabled.

show 1 reply
lynndotpyyesterday at 2:29 PM

Yep. If one is implementing quicksort for a library where it will be used and relied on, I'd sure hope they're optimizing it as much as they can.