1.2 The Tuning Game
Performance tuning is similar to playing a strategy game (but
happily, you are usually paid to do it!). Your target is to get a
better score (lower time) than the last score after each attempt. You
are playing with, not against, the computer, the programmer, the
design and architecture, the compiler, and the flow of control. Your
opponents are time, competing applications, budgetary restrictions,
etc. (You can complete this list better than I can for your
particular situation.)
I once worked with a customer who wanted to know if there was a
"go faster" switch somewhere that
he could just turn on and make the whole application go faster. Of
course, he was not really expecting one, but checked just in case he
had missed a basic option somewhere.
There is no such switch, but very simple techniques sometimes provide
the equivalent. Techniques include switching compilers, turning on
optimizations, using a different runtime VM, finding two or three
bottlenecks in the code or architecture that have simple fixes, and
so on. I have seen all of these yield huge improvements to
applications, sometimes a 20-fold speedup. Order-of-magnitude
speedups are typical for the first round of performance tuning.
|