Robert Roskam on Nostr: Knuth's Law: Premature optimization is the root of all evil. But the full quote is ...
Knuth's Law: Premature optimization is the root of all evil.
But the full quote is more nuanced: "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."
The wisdom isn't "never optimize" but "optimize at the right time with the right data."
Optimize when you have performance problems, data showing bottlenecks, and understand the cost/benefit trade-offs.
Published at
2025-07-11 01:00:33 UTCEvent JSON
{
"id": "100b37b7224558ad91e3e9f734a573292b81cfa7f44cf156c623070775778ea8",
"pubkey": "e7ca38d1e89dd70459587635ccef9753f59814c12b84eed1a8226370e47d3638",
"created_at": 1752195633,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/@raiderrobert/114831893061994056",
"web"
],
[
"proxy",
"https://mastodon.social/users/raiderrobert/statuses/114831893061994056",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/raiderrobert/statuses/114831893061994056",
"pink.momostr"
],
[
"-"
]
],
"content": "Knuth's Law: Premature optimization is the root of all evil.\n\nBut the full quote is more nuanced: \"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.\"\n\nThe wisdom isn't \"never optimize\" but \"optimize at the right time with the right data.\"\n\nOptimize when you have performance problems, data showing bottlenecks, and understand the cost/benefit trade-offs.",
"sig": "395a0766a3a26b062fe3d994a464fee36cf913637653cc93bcff4a50f41a22a199baf2fb16dd1d56db9623c9bede5d9ea973c3606272950c90052cc64bdb9947"
}