top | item 8666936

(no title)

kagia | 11 years ago

>A programmer should not even try to optimize the code that is not proven to be a bottleneck by carefully profiling the whole program

All who haven't taken note, please do!

discuss

order

mercurial|11 years ago

It's a cost/benefit thing. You should try to design your program sensibly when it comes to performance, because the cost of a failed architectural decision is high. What you shouldn't do is micro-optimizations which make the code longer and harder to read.

kagia|11 years ago

I'm not sure a 'readable' preemptive micro optimization is any more sensible. I think we should limit 'sensible' to preemptive macro and architectural optimization. A programmer should examine what their compiler is spitting out before they decide they can do better.