4 ms·
Too often the word "premature" is forgotten, and too often "optimization" is understood to be "any care about performance whatsoever, either low-level or high-l
by tropo 10y ago
Too often the word "premature" is forgotten, and too often "optimization" is understood to be "any care about performance whatsoever, either low-level or high-level".
The comment comes from a time when people would regularly do foul things like changing code similar to a switch/case into something that involves shoving an integer directly into a flags register or worse. (then you must add another case or port to different hardware... uh oh!)
Failure to think about performance from the beginning can get you in deep trouble. The worst case is when there is no bottleneck to be found by a profiler; instead there is slowness spread all throughout. This may force a total rewrite or abandonment of the project. Language choice is particularly prone to causing this, but habitual poor choices can mess you up just as badly.