Frequently, businesses will turn to โconvenience metricsโ average (or mean) response times to gauge overall performance. However while the average might be easy to understand itโs also extremely misleading. (โฆ) The best way to measure this is to track the 99th percentile response time: the worst 1% .
(via The Most Misleading Measure of Response Time: Average โ Optimizely Blog )
Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. 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%.
Donald Knuth (via When optimal matters )...
When optimal matters | Playing with Objects
The rules of optimization (โฆ)
When you are thinking on making an optimization:
First time: Donโt do it! Second time: Donโt do it yet! Third time: Ok, but you first profile and measure, and then optimize