Performance. Code Complete 2 – Chapters 25/26 and Chapter 7 of K&P Compare today to 44 years ago The Burroughs B1700 – circa 1974 Why do we care about performance today? First principle of optimization: DON’T Second principle of optimization: DON’T Third principle of optimization DON’T.
(20% of Italians have 80% of the wealth)
You can get 80% of the result with 20% of the effort.
“Computers are dramatically faster and memory is more plentiful. In the first edition [written 10 years ago], I ran most of the tests in this chapter  10,000 to 50,000 times to get meaningful, measurable results. For this edition I had to run most tests 1 million to 100 million times. When you have to run a test 100 million times to get measurable results, you have to ask whether anyone will ever notice the impact in a real program. Computers have become so powerful that for many common kinds of programs, the level of performance optimization discussed in this chapter has become irrelevant. … People writing desktop applications may not need this information, but people writing software for embedded systems, real-time systems, and other systems with strict speed or space restrictions can still benefit from it.” – pg 643-644, Chapter 26.7, Code Complete 2.