4 ms·
A catch in Knuth's famous quote is how to define "premature". I am not old enough to see how programmers in his time thought about "premature", but my impressio
by attractivechaos 3y ago
A catch in Knuth's famous quote is how to define "premature". I am not old enough to see how programmers in his time thought about "premature", but my impression is quite a few modern programmers think all optimizations are premature.
- alpaca128 3y agoIn the end optimization is always important, but different kinds in different stages of the project. Changing the structure is the easiest at the start when there's not much code, while doing crazy performance tweaks of a function that may be thrown away a day later is a waste of time.
- taeric 3y agoYou can lookup the paper he says it in. The specific construct under question is the GOTO, and he showcases a topological sort that has an early exit that requires one. General framing is that you should use the easier to reason about constructs as you can, but it would be a shame to remove a tool from our toolbox that can make a significant impact. One need only look at the programs he typically writes to see that he is far more obsessed with performance than most of us even know how to be. (I am going off memory here, I should say. Mayhap I have the source wrong. Pretty sure that is the discussion, though.)